proc sql; CREATE TABLE d1.COVID AS SELECT*, FROM d1.owid_covid_data_2019 UNION ALL SELECT*, FROM d1.owid_covid_data_2020 ; quit; proc sql; CREATE TABLE d1.COVID_DATA AS SELECT A.iso_code, A.continent, A.location AS pays, B.date, B.new_cases AS nouveaux_cas, B.new_deaths AS nouveaux_deces, B.new_tests AS nouveaux_tests, B.total_tests AS nb_total_tests, B.population, B.female_smokers AS femmes_fumeuses, B.male_smokers AS hommes_fumeurs FROM d1.iso_code_table AS A INNER JOIN d1.COVID AS B ON A.iso_code = B.iso_code; SELECT*, date format yymmn6. as month, put(date,yyq6.) as quarter FROM d1.COVID_DATA; SELECT*, sum(nouveaux_tests) AS test_par_population, FROM d1.COVID_DATA GROUP BY population; DELETE FROM d1.COVID_DATA WHERE iso_code="owid_wrl"; SELECT sum(nouveaux_cas)/count(nouveaux_cas) AS moyenne_globale, FROM d1.COVID_DATA; SELECT moyenne_globale, CASE WHEN nouveaux_cas>moyenne_globale THEN 1 ELSE 0 end as comparaison_moyenne_globale FROM d1.COVID_DATA; SELECT*, CASE WHEN hommes_fumeurs>femmes_fumeuses THEN "Hommes_plus_Femmes" WHEN hommes_fumeurs<femmes_fumeuses THEN "Hommes_moins_Femmes" WHEN hommes_fumeurs=femmes_fumeuses THEN "Hommes_egale_Femmes" ELSE "NA" end as comparaison_sex FROM d1.COVID_DATA; quit;` `ERROR 22-322: Syntax error, expecting one of the following: a quoted string, !, !!, &, *, **, +, ',', -, /, <, <=, <>, =, >, >=, ?, AND, AS, BETWEEN, CONTAINS, EQ, EQT, FORMAT, FROM, GE, GET, GT, GTT, IN, INFORMAT, INTO, IS, LABEL, LE, LEN, LENGTH, LET, LIKE, LT, LTT, NE, NET, NOT, NOTIN, OR, TRANSCODE, ^, ^=, |, ||, ~, ~=. ERROR 76-322: Syntax error, statement will be ignored.`
... View more