sql help creating union table. I have most of the answer

Create a Union table comparing average weekly earnings of production and nonsupervisory employees between annual_16 and january_17 using the data type 30. Round to the nearest penny. You should have a column for the average earnings and a column for the year, and the period.I haveSELECT ROUND (annual_2016.value,2) AS “Average Earning”, annual_2016.year AS year, annual_2016.period AS periodFROM annual_2016INNER JOIN series ON series.series_id = annual_2016.series_idWHERE data_type_code = 30UNIONSelect ROUND (january_2017.value,2) AS “Average Earning”, january_2017.year AS year, january_2017.period AS periodFROM january_2017INNER JOIN series ON series.series_id = january_2017.series_idWHERE data_type_code = 30
my feedback was : this prompt is looking for the overall average comparison, so there should be some additional aggregate functions (just one for each table you’re unioning)

 

Looking for a Similar Assignment? Let us take care of your classwork while you enjoy your free time! All papers are written from scratch and are 100% Original. Try us today! Use Code FREE15