20 February 2018

orderOfSuccession

My solution:
CREATE PROCEDURE orderOfSuccession() 
BEGIN 
  SELECT CONCAT(IF(gender = "M", "King ", "Queen "), name) AS name 
  FROM   Successors 
  ORDER  BY DATE(birthday); 
END