Decipher what each of the following SQL queries are likely to be returning. -- TEST 1 SELECT 1. CustomerId 1. LoyaltyEma
Posted: Sat May 14, 2022 7:16 pm
Decipher what each of the following SQL queries are likely to be returning. -- TEST 1 SELECT 1. CustomerId 1. LoyaltyEmail, 1. BirthDate, datediff(year, 1. BirthDate, getdate()) FROM EBGamesDWH. dbo. DimCustomer Loyalty l WHERE 1. BirthDate <= dateadd(year, -18, getdate()) -- TEST 2 select distinct prod. SKU from EBGamesDWH. dbo. DimProduct prod where ( prod. name like '%state%decay%' or prod.name like '%dying%light% or prod.name like '%dead%island% or prod.name like '%dead%rising% or prod.name like '%evil%within% or prod.name like '%RESIDENT%EVIL%" or prod. Name like '%ZOMBIU%' or prod. Name like '%ZOMBI % or prod. Name like '%LEFT%4%DEAD% PC and prod. NavPlatformDescription and prod. WebPrice > = 10 -- TEST 3 select top 20 ss. StoreNumber, sum(ss. Quantity) from EBGamesDWH. dbo. FactStoreSales ss where ss. LoyaltyCustomerkey <> -1 and ss.Date between '10/06/2020' and '17/06/2020 and ss. TransactionDescription = 'PREORDER group by ss. StoreNumber order by sum(ss. Quantity) desc