Home » SQL & PL/SQL » SQL & PL/SQL » Retrieve one transaction which has max Net Sales in that day for 1 year and display by date
Retrieve one transaction which has max Net Sales in that day for 1 year and display by date [message #621932] Tue, 19 August 2014 14:46 Go to next message
dwhasini@gmail.com
Messages: 1
Registered: August 2014
Location: Chicago
Junior Member
I wrote a sql query to display net sales total in descending order from highest sales to lowest sales by day for past one year by joining 3 tables Daily Metrics, DStore, Dday . Now I want to retrieve only one transaction day which has the max net sales for that day and so on for one year backward from yesterday.
How can I do that? Please help
Re: Retrieve one transaction which has max Net Sales in that day for 1 year and display by date [message #621934 is a reply to message #621932] Tue, 19 August 2014 14:52 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
welcome to this forum.

Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/ and read http://www.orafaq.com/forum/t/174502/

do you realize & understand that it is extremely challenging to write SQL when you don't know actual table name & column names?
Re: Retrieve one transaction which has max Net Sales in that day for 1 year and display by date [message #621935 is a reply to message #621934] Tue, 19 August 2014 15:03 Go to previous message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

... and primary keys and relation between the tables...

Previous Topic: EXCEPTION WHEN OTHERS
Next Topic: How to find cardinality of a table in oracle
Goto Forum:
  


Current Time: Thu Apr 18 21:56:30 CDT 2024