-- DBMS: sqlite
CREATE TABLE times (
    time_id DATE,
    day_name TEXT,
    day_number_in_week INTEGER,
    day_number_in_month INTEGER,
    calendar_week_number INTEGER,
    fiscal_week_number INTEGER,
    week_ending_day DATE,
    week_ending_day_id INTEGER,
    calendar_month_number INTEGER,
    fiscal_month_number INTEGER,
    calendar_month_desc TEXT,
    calendar_month_id INTEGER,
    fiscal_month_desc TEXT,
    fiscal_month_id INTEGER,
    days_in_cal_month INTEGER,
    days_in_fis_month INTEGER,
    end_of_cal_month DATE,
    end_of_fis_month DATE,
    calendar_month_name TEXT,
    fiscal_month_name TEXT,
    calendar_quarter_desc CHAR(7),
    calendar_quarter_id INTEGER,
    fiscal_quarter_desc CHAR(7),
    fiscal_quarter_id INTEGER,
    days_in_cal_quarter INTEGER,
    days_in_fis_quarter INTEGER,
    end_of_cal_quarter DATE,
    end_of_fis_quarter DATE,
    calendar_quarter_number INTEGER,
    fiscal_quarter_number INTEGER,
    calendar_year INTEGER,
    calendar_year_id INTEGER,
    fiscal_year INTEGER,
    fiscal_year_id INTEGER,
    days_in_cal_year INTEGER,
    days_in_fis_year INTEGER,
    end_of_cal_year DATE,
    end_of_fis_year DATE
);

INSERT INTO times (time_id, day_name, day_number_in_week, day_number_in_month, calendar_week_number, fiscal_week_number, week_ending_day, week_ending_day_id, calendar_month_number, fiscal_month_number, calendar_month_desc, calendar_month_id, fiscal_month_desc, fiscal_month_id, days_in_cal_month, days_in_fis_month, end_of_cal_month, end_of_fis_month, calendar_month_name, fiscal_month_name, calendar_quarter_desc, calendar_quarter_id, fiscal_quarter_desc, fiscal_quarter_id, days_in_cal_quarter, days_in_fis_quarter, end_of_cal_quarter, end_of_fis_quarter, calendar_quarter_number, fiscal_quarter_number, calendar_year, calendar_year_id, fiscal_year, fiscal_year_id, days_in_cal_year, days_in_fis_year, end_of_cal_year, end_of_fis_year) VALUES ('2020-04-11', 'Saturday', 6, 11, 15, 15, '2020-04-12', 1531, 4, 4, '2020-04', 1687, '2020-04', 1735, 30, 28, '2020-04-30', '2020-04-25', 'April', 'April', '2020-02', 1774, '2020-02', 1790, 91, 91, '2020-06-30', '2020-06-27', 2, 2, 2020, 1803, 2020, 1807, 366, 364, '2020-12-31', '2020-12-26'), ('2023-05-31', 'Wednesday', 3, 31, 22, 22, '2023-06-04', 1991, 5, 6, '2023-05', 1961, '2023-06', 1992, 31, 35, '2023-05-31', '2023-06-30', 'May', 'June', '2023-02', 1922, '2023-02', 1925, 91, 91, '2023-06-30', '2023-06-30', 2, 2, 2023, 1813, 2023, 1810, 365, 364, '2023-12-31', '2023-12-29'), ('2020-10-11', 'Sunday', 7, 11, 41, 41, '2020-10-11', 1577, 10, 10, '2020-10', 1693, '2020-10', 1741, 31, 35, '2020-10-31', '2020-10-31', 'October', 'October', '2020-04', 1776, '2020-04', 1792, 92, 91, '2020-12-31', '2020-12-26', 4, 4, 2020, 1803, 2020, 1807, 366, 364, '2020-12-31', '2020-12-26'), ('2020-07-10', 'Friday', 5, 10, 28, 28, '2020-07-12', 1534, 7, 7, '2020-07', 1690, '2020-07', 1738, 31, 28, '2020-07-31', '2020-07-25', 'July', 'July', '2020-03', 1775, '2020-03', 1791, 92, 91, '2020-09-30', '2020-09-26', 3, 3, 2020, 1803, 2020, 1807, 366, 364, '2020-12-31', '2020-12-26'), ('2021-11-28', 'Sunday', 7, 28, 48, 48, '2021-11-28', 1476, 11, 12, '2021-11', 1706, '2021-12', 1755, 30, 35, '2021-11-30', '2021-12-31', 'November', 'December', '2021-04', 1780, '2021-04', 1796, 92, 98, '2021-12-31', '2021-12-31', 4, 4, 2021, 1804, 2021, 1808, 365, 371, '2021-12-31', '2021-12-31');