Let's say , I have a table, ClientTrade, like thus :
ClientName , TradeDate , Quantity
And I want to create a query in Oracle PLSQL which should return the result like this : (The days are derived from the TradeDate column and Mon = sum(Quantity) for Mon , Tue = sum(Quantity) for Tue ... etc.)
ClientName Mon Tue Wed Thu Fri Sat Sun TotalForWeek
ABC 10 15 5 2 4 0 0 34
XYZ 1 1 2 1 2 0 0 7
Assuming that this report will always have where conditions which make it run for one week , is this possible to create this in a single query?