Help with Grouping/Summing multiple rows
Hi,
I am new to SQL in general and looking for some assistance writing a query in oracle SQL Developer. I have a table with many columns and a huge amount of data in it. I have narrowed down the data I want to select with this query. But it still presents me with many thousands of lines that I want to reduce.
SELECT TRUNC(event_time) as Pick_Date
, USERNAME as Picker
, NVL(BESTAND_NEW, 0) - NVL(BESTAND_OLD, 0) AS QtyPicked
FROM event@archive
WHERE event.event_time@archive >= TO_DATE('01-JAN-2014', 'DD-MON-YYYY')
and event.event_time@archive <= TO_DATE('31-DEC-2014', 'DD-MON-YYYY')+1