Skip to content
Advertisement

Tag: date

Difference between NVL and OR in SQL oracle

Hej guys, could someone explain to me difference between NVL() and OR in below query : Number of rows: 44937 and Number of rows: 44782 Why we have this difference: 155 rows? i built a few query based on nvl and notice that issue and going to switch to OR, but I really want to know, why it such a

Selecting new distinct values over time (ORACLE SQL)

I want to select new distinct values and track them over time. I have a table where each row represents a score awarded to a particular person. – timestamp (when the score was awarded) – name (which person received the score) – score (what score the person received) I want the result to look like: The above table should be

Inserting rows based on conditions

Table Name: CaseHistory I’m currently working with a dataset that aims to offer insights on customer support cases on a weekly basis. In the example above, you can see the progression of case 123376 from Week 1 till Week 5, amongst other cases. What I would like to be able to do is insert a row for a case for

MySQL select complete last month

How to select all data from last month (or 30 days)? I already found some answers, and mostly gives this solution But this gives me also the dates from the future I am only interested in the days from last month or 30 days (not next month and beyond) Answer Is this what you want? I added a condition so

Join two columns as a date in sql

I am currently working with a report through Microsoft Query and I ran into this problem where I need to calculate the total amount of money for the past year. The table looks like this: How would you calculate the total amount from 02-2019 to 02-2020 for the item number 12345? Answer Assuming that you are running SQL Server, you

Advertisement