SQL Language (MOSC)

MOSC Banner

Help with Grouping/Summing multiple rows

edited Aug 15, 2014 4:03AM in SQL Language (MOSC) 3 commentsAnswered ✓

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

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center