I have 2 tables in MySQL, one is application the other application_storefront. They look like this:
application:
application_id | title
------------------------------------
529479190 | Clash of Clans
553834731 | Candy Crush Saga
and the table application_storefront which is the countries the applications are available in:
application_id | country_code
--------------------------------
529479190 | USA
529479190 | GBR
529479190 | AUS
I want to create a view or a new table with each country code as a column and then flag if the application is available in that country e.g.
application_id | title | USA | GBR | AUS | etc...
--------------------------------------------------------
529479190 | Clash of Clans | 1 | 1 | 0 | etc...
How do you achieve this in MySQL?