DML / DDL definitons and examples, why AWS? Tell me a creative thing you have done in your current job. SQL query - if there are store with store id and Total_sales and order date, he wanted to compare last weeks revenue to this week by store Id(which I assume because he never wrote the question properly and he just told on the fly, we have board where both of us can write but he have could written the question atleast , its hard to understand the question on the phone with his accent)
Sigiloso
Select A.RevenueA As Week1Revenue ,B.RevenueB as Week2Revenue ,O.StoreID From Orders O Left join ( Select Sum(Revenue) As RevenueA,Storeid From Orders Group By Store_id Having Date-today()=7 And Date-Today()<=14 )B On B.StoreID=O.StoreID On the fly this could be the solution. Can be optimised but without data this could be one solution.