-- create CREATE TABLE EMPLOYEE ( attendance_id INTEGER PRIMARY KEY, event_id INTEGER NOT NULL, event_date DATE NOT NULL, customer_id INTEGER NOT NULL, is_attend INTEGER NOT NULL, group_ids INTEGER NOT NULL, teacher_ids INTEGER NOT NULL ); INSERT INTO EMPLOYEE (event_id, event_date, customer_id, is_attend, group_ids, teacher_ids, attendance_id) VALUES (5,'2020-05-22',47,1,2,6,12), (15,'2020-06-03',354,1,5,4,57), (34,'2020-06-17',183,1,5,4,158), (22,'2020-06-11',12,1,1,3,95), (36,'2020-06-19',260,1,5,4,185), (3,'2020-05-21',197,1,1,3,5), (30,'2020-06-18',419,1,3,5,165), (8,'2020-05-26',47,1,2,6,24), (25,'2020-06-10',401,1,5,4,108), (34,'2020-06-17',354,1,5,4,159), (59,'2020-07-08',700,1,5,4,288); -- упорядочивание всей таблицы по event_date от более свежих дат к более старым SELECT * FROM EMPLOYEE ORDER BY event_date DESC