Question: Please help! Question #1 The SQL statement below has an error, please identify it and how to fix it SELECT Guest_ID, Property, extract (month from

 Please help! Question #1 The SQL statement below has an error,

Please help!

Question #1 The SQL statement below has an error, please identify it and how to fix it SELECT Guest_ID, Property, extract (month from cast (play_date as date)) as month, age group VIP grouping, Location, case when Frequency in ('a.48+') then 'Weekly when frequency in ('b.24-47', c. 12-23') then 'Monthly else 'Infrequent' end as Frequency, sum (case when extract (year from cast (play_date as date)) = 2020 then f_Rev_all end) as Rev_2020, sum (case when extract (year from cast (play_date as date)) = 2019 then f_Rev_all end) as Rev_2019, sum (case when extract (year from cast (play_date as date)) = 2020 then Total_offer_cost end) as Cost_2020, sum (case when extract (year from cast (play_date as date)) = 2019 then Total_offer_cost end) as Cost_2019 WHERE property = 'Tangiers' and extract (month from cast (play_date as date)) = 10 and extract (year from cast (play_date as date)) in (2019,2020) group by 1,2,3,4,5,6,7

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!