what the SQL function that can solve my query

I have 3 tabels (Files,Users,Files_Users) Files Table A Id File Name 1 A 2 B 3 C 4 D 5 E Users Table B Id User Name is_internal is_external 1 Adam 1 1 2 john 1 0 3 Caren 0 1 Files_Users tabel Id File_Id Int_User_Id Ext_User_Id 1 1 1 1 2 2 2 1… Read More what the SQL function that can solve my query

Brand new to SQL, looking to find total sales on a specific day

I have the following: SELECT [Sales_Line_Item].[Sales Date], [Sales_Line_Item].[Quantity]*[Sales_Line_Item].[Unit Price] AS [Total Sales] FROM Sales_Line_Item WHERE [Sales Date] = #9/1/2020#; Which displays: I want to add the total sales together so that the result is: Sales Date Total Sales 9/1/2020 $6,276.00 Thank you for any help I wanted to use SUM(Total Sales) someway but I’m missing… Read More Brand new to SQL, looking to find total sales on a specific day

Could you please help me to find the error in my below sql code

with unmatchedTranCounts as ( select ‘rms.ordhead’ as tableName, count_big(etl_update_ts) as todayRows from rms.ordhead t1 where t1.etl_update_ts >= convert(date, getutcdate()) union all select ‘rms.shipment’ as tableName, count_big(etl_update_ts) as todayRows from rms.shipment t2 where t2.etl_update_ts >=convert(date, getutcdate()) union all select ‘rms.shipsku’ as tableName, count_big(etl_update_ts) as todayRows from rms.shipsku t3 where t3.etl_update_ts >= convert(date, getutcdate()) union all select… Read More Could you please help me to find the error in my below sql code

joining two tables eventhough the id does not display on the second table

i have two tables NAMES and NAMES_VERIFICATIONS NAMES id fname Tax 1 jack 56982 1000 Tim 32165 2321 Andrew 98956 231 Jim 11215 NAMES_VERIFICATIONS id idtype iddata 1 tax 56982 1 passport 12365 2321 tax 98956 2321 passport 65656 so if you notice there is no ID 1000 in the NAMES_VERIFICATIONS table so i want… Read More joining two tables eventhough the id does not display on the second table