I have a sample data here: What I need is for each product_id, the least number is each level Expected result But as I have multiple rows for the same product id, it selects blank over 184 in level 4 Answer You can use case when you aggregate to filter out the 0 values: Note: You could also write the
I have VP3 – Art & Design and HS5 – Health & Social Care, I need to get string after ‘-‘ in Oracle. Can this be achieved using substring?
I have a very specific business requirement to hide certain characters within an email address when returned from SQL and I have hit the limit of my ability with SQL to achieve this. I was wondering if someone out there would be able to point me in the right direction. Essentially, my business is asking for the following: email@example.com to
I’m trying to write an SQL query (using the SELECT function) that will take the first two letters of the first name and the first 5 letters of the last name, then combine them and put them in a new column called “User Name.” I’ve tried using the SUBSTRING and CONCAT functions together, but my syntax isn’t right. Does anyone
I have a database whose columns are npID, title, URL, and issue. Here is an example of two years’ entries: What I would like to do is be able to sort the results based on substrings within the “issue” column. However, until 2010, the client used seasons as the header and in 2010, they started using quarters. Is there a