CREATE PROCEDURE soccerPlayers() BEGIN SELECT GROUP_CONCAT(first_name, ' ', surname, ' #', player_number ORDER BY player_number ASC SEPARATOR '; ') AS players FROM soccer_team; END
22 January 2018
soccerPlayers
My solution:
Labels:
Arcade,
CodeSignal,
Databases,
GROUP Dishes BY Type,
MySQL
movieDirectors
My solution:
CREATE PROCEDURE movieDirectors() BEGIN SELECT director FROM (SELECT director, SUM(oscars) AS n_oscars FROM moviesInfo WHERE year > 2000 AND oscars > 0 GROUP BY director) x WHERE x.n_oscars > 2; END
Labels:
Arcade,
CodeSignal,
Databases,
GROUP Dishes BY Type,
MySQL
travelDiary
My solution:
CREATE PROCEDURE travelDiary() BEGIN SELECT GROUP_CONCAT(DISTINCT country ORDER BY country ASC SEPARATOR ';') AS countries FROM diary; END
Labels:
Arcade,
CodeSignal,
Databases,
GROUP Dishes BY Type,
MySQL
Subscribe to:
Posts (Atom)