Advertisement
Guest User

Untitled

a guest
Mar 28th, 2020
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. SELECT GROUP_CONCAT(
  2. CONCAT(
  3. 'SELECT `Province/State`, ',
  4. '`Country/Region`,',
  5. '`Lat`,',
  6. '`Long`,''',
  7. COLUMN_NAME, ''' AS `Date`, ',
  8. '`', COLUMN_NAME, '` AS `Cases` ',
  9. 'FROM `covid_19_confirmed_cases` '
  10. ) SEPARATOR ' UNION ALL '
  11. )
  12. into @concat_table
  13. FROM INFORMATION_SCHEMA.COLUMNS
  14. WHERE TABLE_NAME = 'covid_19_confirmed_cases'
  15. AND COLUMN_NAME not in ('Province/State','Country/Region','Long','Lat');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement