19 January 2018

newsSubscribers

My solution:
CREATE PROCEDURE newsSubscribers() 
  BEGIN 
    SELECT DISTINCT subscriber 
    FROM   full_year 
    WHERE  full_year.newspaper LIKE "%Daily%" 
    UNION 
    SELECT DISTINCT subscriber 
    FROM   half_year 
    WHERE  half_year.newspaper LIKE "%Daily%" 
    ORDER  BY subscriber ASC; 
  END