imelendez
-
Posts
4 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by imelendez
-
-
Hello Community -
I am trying to figure out the sql query to provide me the results that I am looking for in date range from now to 7 days prior.
Use Case:
When running sales reports for our company, I would like for the query to look at the database and basically pull the last 7 days data. How is this done and could you direct me in that direction, please?
Thank you in advance.
-Isaiah
-
Inner Joins
in SQL
Thank you, Foxy Mod. That helped and worked!
-
Inner Joins
in SQL
Hello All -
I am new to SQL joins and I am having a difficulty grabbing data from another table.
The table I am primarily running select statements on to output the information I need is HRO. I am wanting to grab some data from the StoreInfo table, but, I cannot seem to get the INNER JOIN function to work. I get this "the multiplier identifier could not be bound."
What am I doing wrong? Please see the code below.
use ROWDW; select store_UIN.HRO, store_UIN.StoreInfo FORMAT(SUM(total-tax), 'C', 'en-us') AS 'Sales ending 02/06/2016', COUNT(RO_NO) as 'Car Count', FORMAT(((SUM((total-tax-t_cost)-(p_cost-supplies))/SUM(total-tax-supplies))), 'P', 'en-us' ) as GPM from HRO inner join StoreInfo on store_UIN.HRO = store_UIN.StoreInfo where ( PAY_DATE >= '01/31/2016') And (PAY_DATE <= '02/06/2016') and [Status] = 'C' group by store_UIN
Thanks in advance for your help.
Now And 7 Days Ago - How To?
in SQL
Posted
Hello,
Thanks for the information. However, I did fail to provide a little more information. I was trying to figure out how to do this on MSSQL. Will the logic be the same or is there a reference link that I need to look at that will work best with MSSQL?
Thanks!