Dear all
I currently have this query
SELECT count (load_id) as [number trips], origin_zip, Destination_Zip,Load_Carrier_ID,Load_Carrier_Description
FROM [Rep_UK].[dbo].[Main_table_UK]
WHERE Origin_Zip = 'pr5 0xd'
AND [Trip Type] = 'roundtrip'
AND Empties = 'false'
AND datepart(year, convert(DATETIME2, deliveryDate, 103)) = 2020
GROUP BY origin_zip, Destination_Zip,Load_Carrier_Description,Load_Carrier_ID
HAVING COUNT(*) >= 1;
and I need to incorporate into this the below so it also filters from another (TMS) database,
select* from
[dbo].[DB_TMS]
where Load_Service_ID like '%LTL%'
if anyone can let me know how I should incorporate into one query would be greatly appreciated!!
thank you