SQL Query To Select Zodiac Sign
07:51 11 Apr 2020

Plese tell me sql query to select zodiac sign by birth date.

Here is the table structure.

CREATE TABLE constellation
    constellation_name VARCHAR(5) PRIMARY KEY,
    start_date INTEGER,
    end_date INTEGER
);

INSERT INTO constellation
    VALUES ('Aries', 321,419), ('Taurus',420 ,520),
           ('Gemini', 521,621), ('Cancer',622 ,722),
           ('Leo', 723,822), ('Virgo',823 ,922)
           ('Libra', 923,1023), ('Scorpio',1024 ,1122),
           ('Sagittarius',1123 ,1221), ('Capricorn', 1222,119),
           ('Aquarius', 120,218), ('Pisces', 219,320);
sql