UNIONを絡めた人数の表示がしたい。
Q&A
実行したい事
現状
コード
UNIONを使って、1991年生まれと、1981年生まれお有名人が南にいるか、調べたいです。
日付関数は使えないのですが、UNIONを絡めて分かる方居ましたらお願いします。
### celebrities
INSERT INTO `celebrities` (`id`, `name`, `country_code`, `birth`, `age`, `occupation`) VALUES
(1, 'Emma Charlotte Duerre Watson', 'FRA', '1990-04-15 00:00:00', 31, 'actor'),
(2, 'Johnny Depp', 'USA', '1963-06-09 00:00:00', 58, 'actor'),
(3, 'Jim Carrey', 'USA', '1962-01-17 00:00:00', 59, 'actor'),
(4, 'Daniel Radcliffe', 'GBR', '1989-07-23 00:00:00', 32, 'actor'),
(5, 'Morgan Freeman', 'USA', '1937-06-01 00:00:00', 84, 'actor'),
(6, 'Hugh Jackman', 'AUS', '1968-10-12 00:00:00', 53, 'actor'),
(7, 'Natalie Portman', '', '1981-06-09 00:00:00', 40, 'actor'),
(8, 'Pierce Brosnan', 'FRA', '1960-10-15 00:00:00', 61, 'actor'),
(9, 'Sean Connery', 'PER', '1980-05-05 00:00:00', 41, 'singer'),
(10, 'Dwayne Johnson', 'USA', '1978-12-15 00:00:00', 43, 'fighter'),
(11, 'Jackie Chan', 'USA', '1992-04-15 00:00:00', 29, 'fighter'),
(12, 'Adam Sandler', 'FRA', '1976-02-05 00:00:00', 45, 'singer'),
(13, 'Scarlett Johansson', 'AUT', '1966-01-10 00:00:00', 55, 'model'),
(14, 'Heath Ledger', 'USA', '1971-10-15 00:00:00', 50, 'actor'),
(15, 'Edward Norton', 'GBR', '1988-03-12 00:00:00', 33, 'actor'),
(16, 'Keira Knightley', 'GBR', '1980-11-10 00:00:00', 41, 'model'),
(17, 'Bradley Cooper', 'USA', '1979-08-01 00:00:00', 42, 'fighter'),
(18, 'Will Ferrell', 'USA', '1966-01-15 00:00:00', 53, 'comedian'),
(19, 'Julia Roberts', 'GRC', '1964-09-01 00:00:00', 55, 'actor'),
(20, 'Daniel Craig', 'USA', '1977-12-09 00:00:00', 44, 'actor'),
(21, 'Ian McKellen', '', '1998-04-15 00:00:00', 23, 'singer'),
(22, 'Samuel L. Jackson', 'USA', '1960-04-09 00:00:00', 61, 'actor'),
(23, 'Ben Stiller', 'BRA', '1964-10-15 00:00:00', 57, 'actor'),
(24, 'Tommy Lee Jones', '', '1970-09-05 00:00:00', 51, 'comedian'),
(25, 'Antonio Banderas', 'USA', '1958-10-05 00:00:00', 63, 'actor'),
(26, 'Denzel Washington', 'USA', '1990-10-25 00:00:00', 31, 'model'),
(27, 'Steve Carell', 'USA', '1991-02-14 00:00:00', 30, 'actor'),
(28, 'Shia LaBeouf', 'CHL', '1991-10-05 00:00:00', 30, 'actor'),
(29, 'Megan Fox', 'GRC', '1992-09-23 00:00:00', 29, 'actor'),
(30, 'James Franco', 'USA', '1955-04-15 00:00:00', 66, 'actor'),
(31, 'Mel Gibson', 'COL', '1967-03-08 00:00:00', 54, 'singer'),
(32, 'Vin Diesel', 'USA', '1982-11-15 00:00:00', 39, 'singer'),
(33, 'Tim Allen', 'ISL', '1962-02-10 00:00:00', 59, 'actor'),
(34, 'Kevin Spacey', 'USA', '1990-04-15 00:00:00', 31, 'actor'),
(35, 'Jason Biggs', 'USA', '1979-03-25 00:00:00', 42, 'actor'),
(36, 'Seann William Scott', 'USA', '1957-02-22 00:00:00', 64, 'actor'),
(37, 'Jean-Claude Van Damme', 'USA', '1997-01-10 00:00:00', 24, 'model'),
(38, 'Zach Galifianakis', 'USA', '1969-04-22 00:00:00', 52, 'actor'),
(39, 'Owen Wilson', 'USA', '1988-06-05 00:00:00', 31, 'actor'),
(40, 'Christian Bale', 'USA', '1977-12-01 00:00:00', 44, 'actor'),
(41, 'Peter Jackson', 'USA', '1994-10-25 00:00:00', 27, 'model'),
(42, 'Sandra Bullock', 'CUA', '1975-07-19 00:00:00', 46, 'actor'),
(43, 'Drew Barrymore', 'USA', '1993-06-05 00:00:00', 28, 'singer'),
(44, 'Macaulay Culkin', 'ESP', '1981-07-22 00:00:00', 40, 'comedian'),
(45, 'Bill Murray', 'USA', '1988-03-09 00:00:00', 33, 'actor'),
(46, 'Sigourney Weaver', 'FIN', '1954-12-10 00:00:00', 67, 'actor'),
(47, 'Jake Gyllenhaal', '', '1990-05-05 00:00:00', 31, 'model'),
(48, 'Jason Statham', 'USA', '1986-06-08 00:00:00', 35, 'actor');
0