/*
 * Copyright (c) 2023. Nyaruko.
 */

/*
 * Copyright (c) 2023. Nyaruko.
 */


/*
 * Copyright (c) 2023. Nyaruko.
 */


USE DuAnXuongLv2_Nhom5_NguyenVV4
GO

--UPDATE 1:01AM  26/7/2023

insert into tai_khoan (ma, ten, ngay_sinh, email, so_dien_thoai, mat_khau, gioi_tinh, ngay_tao, ngay_sua, trang_thai) values ('TK1', N'Huy', '2003-10-18', 'trankine0@cdbaby.com', '1492069833', '123456', 1, '2021-11-20', '2020-07-29', 1);
insert into tai_khoan (ma, ten, ngay_sinh, email, so_dien_thoai, mat_khau, gioi_tinh, ngay_tao, ngay_sua, trang_thai) values ('TK2', N'Toàn', '2021-07-30', 'knickless1@infoseek.co.jp', '9785388115', '123456', 0, '2005-07-17', '2010-01-29', 2);
insert into tai_khoan (ma, ten, ngay_sinh, email, so_dien_thoai, mat_khau, gioi_tinh, ngay_tao, ngay_sua, trang_thai) values ('TK3', N'Tuấn', '2016-07-26', 'gcalles2@bloglovin.com', '7466112528', '123456', 0, '2017-09-17', '2015-01-12', 2);
insert into tai_khoan (ma, ten, ngay_sinh, email, so_dien_thoai, mat_khau, gioi_tinh, ngay_tao, ngay_sua, trang_thai) values ('TK4', N'Hải', '2014-07-23', 'mcicullo3@time.com', '8550879878', '123456', 0, '2017-12-06', '2012-06-02', 2);
insert into tai_khoan (ma, ten, ngay_sinh, email, so_dien_thoai, mat_khau, gioi_tinh, ngay_tao, ngay_sua, trang_thai) values ('TK5', N'Toàn', '2020-10-10', 'lalbisser4@twitpic.com', '0324079230', '123456', 1, '2012-02-01', '2004-01-23', 2);
insert into tai_khoan (ma, ten, ngay_sinh, email, so_dien_thoai, mat_khau, gioi_tinh, ngay_tao, ngay_sua, trang_thai) values ('TK6', N'Linh', '2010-03-12', 'jtapner5@stanford.edu', '1136662650', '123456', 1, '2015-05-20', '2018-08-02', 2);
insert into tai_khoan (ma, ten, ngay_sinh, email, so_dien_thoai, mat_khau, gioi_tinh, ngay_tao, ngay_sua, trang_thai) values ('TK7', N'Khánh', '2004-11-15', 'mpautot6@berkeley.edu', '9782251003', '123456', 1, '2009-11-29', '2006-06-25', 1);
insert into tai_khoan (ma, ten, ngay_sinh, email, so_dien_thoai, mat_khau, gioi_tinh, ngay_tao, ngay_sua, trang_thai) values ('TK8', N'Quân', '2017-10-10', 'hsemeniuk7@house.gov', '7727123129', '123456', 0, '2011-03-13', '2020-12-30', 1);
insert into tai_khoan (ma, ten, ngay_sinh, email, so_dien_thoai, mat_khau, gioi_tinh, ngay_tao, ngay_sua, trang_thai) values ('TK9', N'Long', '2002-06-01', 'ahollows8@earthlink.net', '7209760334', '123456', 0, '2005-04-20', '2002-05-26', 1);
insert into tai_khoan (ma, ten, ngay_sinh, email, so_dien_thoai, mat_khau, gioi_tinh, ngay_tao, ngay_sua, trang_thai) values ('TK10', N'Giang', '2006-01-06', 'acaso9@soundcloud.com', '9929546731', '123456', 0, '2021-08-12', '2011-02-12', 2);
insert into tai_khoan (ma, ten, ngay_sinh, email, so_dien_thoai, mat_khau, gioi_tinh, ngay_tao, ngay_sua, trang_thai) values ('TK11', N'Toàn', '2007-04-25', 'cberga@europa.eu', '0441304540', '123456', 1, '2017-11-19', '2004-06-25', 2);
insert into tai_khoan (ma, ten, ngay_sinh, email, so_dien_thoai, mat_khau, gioi_tinh, ngay_tao, ngay_sua, trang_thai) values ('TK12', N'Minh', '2020-03-13', 'vleadstoneb@weibo.com', '1352108577', '123456', 1, '2022-12-20', '2006-11-03', 1);
insert into tai_khoan (ma, ten, ngay_sinh, email, so_dien_thoai, mat_khau, gioi_tinh, ngay_tao, ngay_sua, trang_thai) values ('TK13', N'Tùng', '2002-11-05', 'mfrankc@arstechnica.com', '7175856563', '123456', 1, '2008-04-14', '2011-11-05', 2);
insert into tai_khoan (ma, ten, ngay_sinh, email, so_dien_thoai, mat_khau, gioi_tinh, ngay_tao, ngay_sua, trang_thai) values ('TK14', N'Hương', '2019-09-15', 'imerietd@rakuten.co.jp', '6806813925', '123456', 1, '2006-12-23', '2021-11-02', 1);
insert into tai_khoan (ma, ten, ngay_sinh, email, so_dien_thoai, mat_khau, gioi_tinh, ngay_tao, ngay_sua, trang_thai) values ('TK15', N'Quang', '2001-05-16', 'mnodese@amazon.com', '2639334034', '123456', 0, '2010-12-13', '2018-09-20', 1);
 
SELECT * FROM tai_khoan




insert into dia_chi (tinh_thanh, quan_huyen, phuong_xa, dia_chi_cu_the, trang_thai_mac_dinh, id_tai_khoan) values (N'Vĩnh Phúc', N'Nam Từ Liêm', N'Mai Dịch', N'số 8', 1, 1);
insert into dia_chi (tinh_thanh, quan_huyen, phuong_xa, dia_chi_cu_the, trang_thai_mac_dinh, id_tai_khoan) values (N'Thanh Hóa', N'Đống Đa', N'Xuân Phương', N'Ngách 450', 2, 2);
insert into dia_chi (tinh_thanh, quan_huyen, phuong_xa, dia_chi_cu_the, trang_thai_mac_dinh, id_tai_khoan) values (N'Lạng Sơn', N'Bắc Từ Liêm', N'Quốc Tuấn', N'Số 45', 2, 3);
insert into dia_chi (tinh_thanh, quan_huyen, phuong_xa, dia_chi_cu_the, trang_thai_mac_dinh, id_tai_khoan) values (N'Hà Tĩnh', N'Kiến Xương', N'Phú Đô', N'Ngách 322', 1, 4);
insert into dia_chi (tinh_thanh, quan_huyen, phuong_xa, dia_chi_cu_the, trang_thai_mac_dinh, id_tai_khoan) values (N'Vĩnh Phúc', N'Thanh Trì', N'Xuân Phương', N'Đường láng', 2, 5);
insert into dia_chi (tinh_thanh, quan_huyen, phuong_xa, dia_chi_cu_the, trang_thai_mac_dinh, id_tai_khoan) values (N'Hà Tĩnh', N'Quốc Oai', N'Mỹ Đình', N'Đường 20', 1, 6);
insert into dia_chi (tinh_thanh, quan_huyen, phuong_xa, dia_chi_cu_the, trang_thai_mac_dinh, id_tai_khoan) values (N'Hà Nội', N'Ba Đình', N'Quốc Tuấn', N'số 8', 1, 7);
insert into dia_chi (tinh_thanh, quan_huyen, phuong_xa, dia_chi_cu_the, trang_thai_mac_dinh, id_tai_khoan) values (N'Thái Nguyên', N'Thanh Xuân', N'Xuân Phương', N'Nhà riêng', 1, 8);
insert into dia_chi (tinh_thanh, quan_huyen, phuong_xa, dia_chi_cu_the, trang_thai_mac_dinh, id_tai_khoan) values (N'Thanh Hóa', N'Thanh Xuân', N'Nguyễn Xiển', N'Ngách 322', 2, 9);
insert into dia_chi (tinh_thanh, quan_huyen, phuong_xa, dia_chi_cu_the, trang_thai_mac_dinh, id_tai_khoan) values (N'Sơn La', N'Bắc Từ Liêm', N'Mai Dịch', N'Nhà riêng', 1, 10);
insert into dia_chi (tinh_thanh, quan_huyen, phuong_xa, dia_chi_cu_the, trang_thai_mac_dinh, id_tai_khoan) values (N'Thái Bình', N'Thanh Trì', N'Mai Dịch', N'Đường láng', 1, 11);
insert into dia_chi (tinh_thanh, quan_huyen, phuong_xa, dia_chi_cu_the, trang_thai_mac_dinh, id_tai_khoan) values (N'Vĩnh Phúc', N'Ba Đình', N'Lê Đức Thọ', N'Đường 20', 2, 12);
insert into dia_chi (tinh_thanh, quan_huyen, phuong_xa, dia_chi_cu_the, trang_thai_mac_dinh, id_tai_khoan) values (N'Bắc Ninh', N'Ba Đình', N'Mai Dịch', N'Đường láng', 2, 13);
insert into dia_chi (tinh_thanh, quan_huyen, phuong_xa, dia_chi_cu_the, trang_thai_mac_dinh, id_tai_khoan) values (N'Thanh Hóa', N'Bắc Từ Liêm', N'Phú Đô', N'Tổ 4', 1, 14);
insert into dia_chi (tinh_thanh, quan_huyen, phuong_xa, dia_chi_cu_the, trang_thai_mac_dinh, id_tai_khoan) values (N'Sơn La', N'Kiến Xương', N'Lê Đức Thọ', N'số 8', 1, 15);

SELECT * FROM dia_chi


insert into voucher (ma, ten, ngay_bat_dau, ngay_ket_thuc, don_toi_thieu, giam_toi_da, muc_phan_tram_giam, muc_giam_tien_mat, trang_thai) values ('VC1', 'No discount', '2006-09-28', '2020-01-02', 187, 50, 38, 89, 1);
insert into voucher (ma, ten, ngay_bat_dau, ngay_ket_thuc, don_toi_thieu, giam_toi_da, muc_phan_tram_giam, muc_giam_tien_mat, trang_thai) values ('VC2', 'Supper Sale', '2001-12-13', '2014-05-16', 11, 81, 14, 91, 1);
insert into voucher (ma, ten, ngay_bat_dau, ngay_ket_thuc, don_toi_thieu, giam_toi_da, muc_phan_tram_giam, muc_giam_tien_mat, trang_thai) values ('VC3', 'No discount', '2010-03-04', '2015-08-22', 73, 42, 35, 31, 2);
insert into voucher (ma, ten, ngay_bat_dau, ngay_ket_thuc, don_toi_thieu, giam_toi_da, muc_phan_tram_giam, muc_giam_tien_mat, trang_thai) values ('VC4', 'No discount', '2006-02-15', '2021-10-08', 197, 88, 36, 78, 1);
insert into voucher (ma, ten, ngay_bat_dau, ngay_ket_thuc, don_toi_thieu, giam_toi_da, muc_phan_tram_giam, muc_giam_tien_mat, trang_thai) values ('VC5', 'Lord of vouchers', '2004-08-29', '2012-04-28', 105, 76, 6, 44, 1);
insert into voucher (ma, ten, ngay_bat_dau, ngay_ket_thuc, don_toi_thieu, giam_toi_da, muc_phan_tram_giam, muc_giam_tien_mat, trang_thai) values ('VC6', 'Supper Sale', '2003-04-12', '2020-12-07', 183, 88, 40, 93, 1);
insert into voucher (ma, ten, ngay_bat_dau, ngay_ket_thuc, don_toi_thieu, giam_toi_da, muc_phan_tram_giam, muc_giam_tien_mat, trang_thai) values ('VC7', 'No discount', '2003-10-17', '2013-10-11', 59, 37, 20, 46, 2);
insert into voucher (ma, ten, ngay_bat_dau, ngay_ket_thuc, don_toi_thieu, giam_toi_da, muc_phan_tram_giam, muc_giam_tien_mat, trang_thai) values ('VC8', 'No discount', '2005-10-16', '2012-10-25', 185, 60, 5, 23, 3);
insert into voucher (ma, ten, ngay_bat_dau, ngay_ket_thuc, don_toi_thieu, giam_toi_da, muc_phan_tram_giam, muc_giam_tien_mat, trang_thai) values ('VC9', 'Deep discount', '2007-02-10', '2018-08-01', 139, 39, 10, 38, 2);
insert into voucher (ma, ten, ngay_bat_dau, ngay_ket_thuc, don_toi_thieu, giam_toi_da, muc_phan_tram_giam, muc_giam_tien_mat, trang_thai) values ('VC10', 'Discount king', '2005-09-28', '2011-11-14', 64, 37, 12, 71, 2);
insert into voucher (ma, ten, ngay_bat_dau, ngay_ket_thuc, don_toi_thieu, giam_toi_da, muc_phan_tram_giam, muc_giam_tien_mat, trang_thai) values ('VC11', 'Discount price', '2008-06-10', '2018-05-04', 84, 14, 50, 42, 1);
insert into voucher (ma, ten, ngay_bat_dau, ngay_ket_thuc, don_toi_thieu, giam_toi_da, muc_phan_tram_giam, muc_giam_tien_mat, trang_thai) values ('VC12', 'Deep discount', '2000-12-27', '2016-11-03', 151, 59, 27, 12, 2);
insert into voucher (ma, ten, ngay_bat_dau, ngay_ket_thuc, don_toi_thieu, giam_toi_da, muc_phan_tram_giam, muc_giam_tien_mat, trang_thai) values ('VC13', 'Discount price forever', '2001-11-20', '2013-11-18', 51, 57, 36, 52, 2);
insert into voucher (ma, ten, ngay_bat_dau, ngay_ket_thuc, don_toi_thieu, giam_toi_da, muc_phan_tram_giam, muc_giam_tien_mat, trang_thai) values ('VC14', 'Lord of vouchers', '2009-02-01', '2018-05-28', 159, 52, 17, 11, 1);
insert into voucher (ma, ten, ngay_bat_dau, ngay_ket_thuc, don_toi_thieu, giam_toi_da, muc_phan_tram_giam, muc_giam_tien_mat, trang_thai) values ('VC15', 'Lord of vouchers', '2001-05-30', '2018-02-25', 161, 64, 23, 87, 2);

SELECT * FROM voucher




insert into chuc_vu (ma, ten, trang_thai) values ('CV1', 'Customer', 1);
insert into chuc_vu (ma, ten, trang_thai) values ('CV2', 'Admin', 2);

select * from chuc_vu




insert into chat_lieu (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('CL1', N'Vải Mỏng', 2, '2010-11-21', '2001-10-22');
insert into chat_lieu (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('CL2', N'Vải Dãn', 1, '2011-02-12', '2009-11-01');
insert into chat_lieu (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('CL5', N'Vải Mềm', 2, '2014-04-12', '2018-05-22');
insert into chat_lieu (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('CL6', N'Vải Mát', 1, '2023-04-13', '2021-03-01');
insert into chat_lieu (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('CL11', N'Vải Đểu', 2, '2004-12-02', '2009-09-27');
insert into chat_lieu (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('CL14', N'Vải Dày', 1, '2006-07-15', '2005-03-21');


select * from chat_lieu






insert into form_dang (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('FD1', N'Chân dài', 1, '2003-12-03', '8/13/2022');
insert into form_dang (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('FD2', N'Duyên dáng', 2, '2022-12-31', '7/10/2022');
insert into form_dang (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('FD4', N'Bê đê', 1, '2022-08-25', '1/28/2023');
insert into form_dang (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('FD9', N'Men lỳ', 1, '2021-06-28', '12/20/2022');
insert into form_dang (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('FD14', N'Hôi nách', 2, '2022-09-21', '11/8/2022');

select * from form_dang





insert into kich_co (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('KC1', 'S', 2, '2013-02-10', '2022-11-12');
insert into kich_co (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('KC2', 'L', 2, '2013-11-17', '2021-07-05');
insert into kich_co (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('KC4', 'M', 2, '2002-11-28', '2023-06-15');
insert into kich_co (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('KC6', '2XL', 1, '2008-03-27', '2021-12-03');
insert into kich_co (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('KC9', 'XXX', 1, '2011-11-30', '2022-12-28');
insert into kich_co (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('KC10', 'XXL', 2, '2010-11-15', '2002-12-24');
insert into kich_co (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('KC13', '3XL', 1, '2016-07-15', '2015-05-20');

select * from kich_co






insert into mau_sac (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('MS1', N'Đỏ', 1, '2016-09-20', '2015-05-30');
insert into mau_sac (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('MS2', N'Cam', 2, '2021-12-07', '2012-02-02');
insert into mau_sac (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('MS3', N'Nâu', 1, '2007-08-18', '2005-08-23');
insert into mau_sac (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('MS5', N'Đen', 2, '2018-12-21', '2003-10-02');
insert into mau_sac (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('MS7', N'Vàng', 1, '2005-09-08', '2005-11-17');
insert into mau_sac (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('MS11', N'Xanh', 2, '2007-11-15', '2018-06-06');
insert into mau_sac (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('MS13', N'Xám', 1, '2022-01-04', '2018-05-06');

select * from mau_sac






insert into nsx (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('NSX1', N'Campuchia', 2, '2002-05-19', '2022-04-03');
insert into nsx (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('NSX2', N'Korea', 1, '2008-07-08', '2001-05-31');
insert into nsx (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('NSX3', N'Indonesia', 1, '2004-02-04', '2022-04-09');
insert into nsx (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('NSX4', N'VietNam', 2, '2009-07-20', '2014-04-19');
insert into nsx (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('NSX6', N'China', 2, '2021-11-10', '2007-11-02');


select * from nsx




insert into thiet_ke (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('TK1', N'Thiết kế pro', 2, '2021-12-27', '2014-11-05');
insert into thiet_ke (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('TK3', N'Thiết kế hihi', 1, '2011-04-08', '2006-06-06');
insert into thiet_ke (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('TK4', N'Thiết kế siêu cấp', 1, '2005-07-10', '2005-08-22');
insert into thiet_ke (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('TK6', N'Thiết kế 1', 1, '2002-11-16', '2007-11-03');
insert into thiet_ke (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('TK9', N'Thiết kế đỉnh count', 1, '2000-10-01', '2007-03-30');

select * from thiet_ke




insert into san_pham (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('SP1', N'Áo da siu cấp', 1, '2018-10-31', '2006-11-29');
insert into san_pham (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('SP2', N'Áo thể thao', 2, '2005-04-10', '2002-09-03');
insert into san_pham (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('SP4', N'Áo phao', 2, '2007-01-21', '2015-12-14');
insert into san_pham (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('SP5', N'Áo bóng đá', 1, '2014-01-20', '2012-10-15');
insert into san_pham (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('SP6', N'Áo len', 2, '2004-04-08', '2005-09-16');
insert into san_pham (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('SP8', N'Áo vest', 1, '2007-03-05', '2021-11-05');
insert into san_pham (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('SP9', N'Áo phông', 2, '2010-09-09', '2010-01-19');
insert into san_pham (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('SP12', N'Áo bò', 1, '2000-11-01', '2022-03-09');

select * from san_pham





insert into loai_san_pham (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('LSP1', N'Loại 1', 1, '2003-05-19', '2014-12-26');
insert into loai_san_pham (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('LSP2', N'Loại 2', 1, '2018-05-07', '2018-12-30');
insert into loai_san_pham (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('LSP8', N'Loại 3', 2, '2006-08-19', '2014-08-31');
insert into loai_san_pham (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('LSP5', N'Loại 4', 1, '2007-12-07', '2010-04-23');
insert into loai_san_pham (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('LSP4', N'Loại 5', 2, '2001-10-24', '2006-12-12');
insert into loai_san_pham (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('LSP6', N'Loại 6', 1, '2009-10-16', '2003-11-08');
insert into loai_san_pham (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('LSP10', N'Loại 7', 2, '2016-05-22', '2008-07-27');
insert into loai_san_pham (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('LSP3', N'Loại 8', 1, '2001-09-28', '2022-08-07');
insert into loai_san_pham (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('LSP9', N'Loại 9', 1, '2019-12-20', '2002-10-12');
insert into loai_san_pham (ma, ten, trang_thai, ngay_tao, ngay_sua) values ('LSP7', N'Loại 10', 1, '2019-12-20', '2002-10-12');


select * from loai_san_pham






insert into giam_gia (ma, ten, ngay_bat_dau, ngay_ket_thuc, muc_phan_tram_giam, muc_giam_tien_mat, trang_thai) values ('GG1', N'Giảm giá siu cấp', '2001-04-20', '2016-01-30', 27, 87, 2);
insert into giam_gia (ma, ten, ngay_bat_dau, ngay_ket_thuc, muc_phan_tram_giam, muc_giam_tien_mat, trang_thai) values ('GG2', N'Giảm giá thiên đàng', '2001-12-19', '2018-03-03', 26, 43, 1);
insert into giam_gia (ma, ten, ngay_bat_dau, ngay_ket_thuc, muc_phan_tram_giam, muc_giam_tien_mat, trang_thai) values ('GG3', N'Giảm giá cực chill', '2008-11-11', '2021-11-04', 21, 95, 2);
insert into giam_gia (ma, ten, ngay_bat_dau, ngay_ket_thuc, muc_phan_tram_giam, muc_giam_tien_mat, trang_thai) values ('GG4', N'Giảm giá Khá Bảnh', '2001-12-18', '2014-05-19', 32, 29, 2);
insert into giam_gia (ma, ten, ngay_bat_dau, ngay_ket_thuc, muc_phan_tram_giam, muc_giam_tien_mat, trang_thai) values ('GG13', N'Giảm giá địa ngục', '2009-01-22', '2014-01-26', 38, 96, 1);


select * from giam_gia







insert into chi_tiet_san_pham (ma, mo_Ta, so_luong, gia_nhap, gia_ban, gia_sau_khi_giam, ngay_tao, ngay_sua, trang_thai, id_chat_lieu, id_san_pham, id_mau_sac, id_loai_san_pham, id_nsx, id_kich_co, id_thiet_ke, id_form_dang) values ('CTSP1', N'Áo này vip quá', 149, 861, 633, 97, '2010-05-08', '2000-07-21', 1, 1, 1, 1, 1, 1, 1, 1, 1);
insert into chi_tiet_san_pham (ma, mo_Ta, so_luong, gia_nhap, gia_ban, gia_sau_khi_giam, ngay_tao, ngay_sua, trang_thai, id_chat_lieu, id_san_pham, id_mau_sac, id_loai_san_pham, id_nsx, id_kich_co, id_thiet_ke, id_form_dang) values ('CTSP2', N'Áo này đẹp quá', 268, 171, 366, 238, '2004-09-01', '2012-08-05', 1, 2, 2, 2, 2, 2, 2, 2, 2);
insert into chi_tiet_san_pham (ma, mo_Ta, so_luong, gia_nhap, gia_ban, gia_sau_khi_giam, ngay_tao, ngay_sua, trang_thai, id_chat_lieu, id_san_pham, id_mau_sac, id_loai_san_pham, id_nsx, id_kich_co, id_thiet_ke, id_form_dang) values ('CTSP3', N'Áo này mặc vào là tùm lum', 298, 545, 610, 161, '2020-06-24', '2003-08-19', 1, 3, 3, 3, 3, 3, 3, 3, 3);
insert into chi_tiet_san_pham (ma, mo_Ta, so_luong, gia_nhap, gia_ban, gia_sau_khi_giam, ngay_tao, ngay_sua, trang_thai, id_chat_lieu, id_san_pham, id_mau_sac, id_loai_san_pham, id_nsx, id_kich_co, id_thiet_ke, id_form_dang) values ('CTSP4', N'Ảo này dảk quá', 63, 669, 493, 323, '2011-11-28', '2014-04-06', 1, 4, 4, 4, 4, 4, 4, 4, 4);
insert into chi_tiet_san_pham (ma, mo_Ta, so_luong, gia_nhap, gia_ban, gia_sau_khi_giam, ngay_tao, ngay_sua, trang_thai, id_chat_lieu, id_san_pham, id_mau_sac, id_loai_san_pham, id_nsx, id_kich_co, id_thiet_ke, id_form_dang) values ('CTSP5', N'Áo này vừa khít', 291, 493, 588, 528, '2018-11-11', '2016-03-09', 1, 5, 5, 5, 5, 5, 5, 5, 5);



select * from chi_tiet_san_pham






insert into giam_gia_chi_tiet (trang_thai, id_chi_tiet_san_pham, id_giam_gia) values (2, 1, 1);
insert into giam_gia_chi_tiet (trang_thai, id_chi_tiet_san_pham, id_giam_gia) values (2, 2, 2);
insert into giam_gia_chi_tiet (trang_thai, id_chi_tiet_san_pham, id_giam_gia) values (1, 3, 3);
insert into giam_gia_chi_tiet (trang_thai, id_chi_tiet_san_pham, id_giam_gia) values (2, 4, 4);
insert into giam_gia_chi_tiet (trang_thai, id_chi_tiet_san_pham, id_giam_gia) values (1, 5, 5);


select * from giam_gia_chi_tiet






insert into nhan_vien (ma, ten, ngay_sinh, gioi_tinh, dia_chi, so_dien_thoai, email, mat_khau, trang_thai, id_chuc_vu) values ('NV1', N'Quân', '2003-06-01', 1, N'Hà Nội', '0936163632', 'quanpmph27325@fpt.edu.vn', 1, 1, 2);
insert into nhan_vien (ma, ten, ngay_sinh, gioi_tinh, dia_chi, so_dien_thoai, email, mat_khau, trang_thai, id_chuc_vu) values ('NV2', N'Nghĩa', '1995-12-22', 1, N'Bắc Ninh', '7871284967', 'rlenton1@netscape.com', 1, 0, 1);
insert into nhan_vien (ma, ten, ngay_sinh, gioi_tinh, dia_chi, so_dien_thoai, email, mat_khau, trang_thai, id_chuc_vu) values ('NV3', N'Linh', '8/29/2001', 0, N'Cà Mau', 1, 'jpaybody0@virginia.edu', 1, 1, 1);
insert into nhan_vien (ma, ten, ngay_sinh, gioi_tinh, dia_chi, so_dien_thoai, email, mat_khau, trang_thai, id_chuc_vu) values ('NV4', N'Lợi', '5/19/2000', 0, N'Cà Mau', 2, 'lmound1@toplist.cz', 2, 1, 1);
insert into nhan_vien (ma, ten, ngay_sinh, gioi_tinh, dia_chi, so_dien_thoai, email, mat_khau, trang_thai, id_chuc_vu) values ('NV5', N'Khang', '2/4/2000', 0, N'Thanh Hóa', 3, 'tswithenby2@unesco.org', 3, 0, 1);
insert into nhan_vien (ma, ten, ngay_sinh, gioi_tinh, dia_chi, so_dien_thoai, email, mat_khau, trang_thai, id_chuc_vu) values ('NV6', N'Dương', '10/14/1998', 0, N'Vĩnh Phúc', 4, 'msomerled3@nhs.uk', 4, 1, 1);
insert into nhan_vien (ma, ten, ngay_sinh, gioi_tinh, dia_chi, so_dien_thoai, email, mat_khau, trang_thai, id_chuc_vu) values ('NV7', N'Lương', '7/10/1999', 1, N'Bắc Giang', 5, 'fdiiorio4@ehow.com', 5, 1, 1);
insert into nhan_vien (ma, ten, ngay_sinh, gioi_tinh, dia_chi, so_dien_thoai, email, mat_khau, trang_thai, id_chuc_vu) values ('NV8', N'Huệ', '8/10/2001', 1, N'Thái Bình', 6, 'emuldrew5@elpais.com', 6, 0, 1);
insert into nhan_vien (ma, ten, ngay_sinh, gioi_tinh, dia_chi, so_dien_thoai, email, mat_khau, trang_thai, id_chuc_vu) values ('NV9', N'Linh', '10/6/1997', 1, N'Thanh Hóa', 7, 'dheckner6@pcworld.com', 7, 1, 1);
insert into nhan_vien (ma, ten, ngay_sinh, gioi_tinh, dia_chi, so_dien_thoai, email, mat_khau, trang_thai, id_chuc_vu) values ('NV10', N'Dũng', '10/17/1997', 0, N'TP Hồ Chí Minh', 8, 'lpinniger7@last.fm', 8, 0, 1);
insert into nhan_vien (ma, ten, ngay_sinh, gioi_tinh, dia_chi, so_dien_thoai, email, mat_khau, trang_thai, id_chuc_vu) values ('NV11', N'Linh', '2/12/2000', 0, N'TP Hồ Chí Minh', 9, 'mbadder8@blogspot.com', 9, 0, 1);
insert into nhan_vien (ma, ten, ngay_sinh, gioi_tinh, dia_chi, so_dien_thoai, email, mat_khau, trang_thai, id_chuc_vu) values ('NV12', N'Dũng', '12/15/1999', 1, N'Thái Bình', 10, 'tmarte9@amazon.com', 10, 1, 1);

select * from nhan_vien






insert into gio_hang (ma, ngay_tao, id_tai_khoan, id_nhan_vien) values ('GH1', '2010-03-19', 1, 1);
insert into gio_hang (ma, ngay_tao, id_tai_khoan, id_nhan_vien) values ('GH2', '2003-11-01', 2, 2);


select * from gio_hang







insert into gio_hang_chi_tiet (so_luong, don_gia, don_gia_khi_giam, id_gio_hang, id_chi_tiet_san_pham) values (50, 365, 134, 1, 1);
insert into gio_hang_chi_tiet (so_luong, don_gia, don_gia_khi_giam, id_gio_hang, id_chi_tiet_san_pham) values (161, 583, 197, 2, 2);



select * from gio_hang_chi_tiet






insert into hinh_thuc_thanh_toan (ma, kieu_thanh_toan, trang_thai) values ('HTTT1', N'Chuyển khoản', 2);
insert into hinh_thuc_thanh_toan (ma, kieu_thanh_toan, trang_thai) values ('HTTT2', N'Tiền mặt', 3);
insert into hinh_thuc_thanh_toan (ma, kieu_thanh_toan, trang_thai) values ('HTTT3', N'Quẹt thẻ', 1);


select * from hinh_thuc_thanh_toan





insert into hoa_don (ma, tong_tien, ten_nguoi_nhan, dia_chi, so_dien_thoai, ghi_chu, ngay_tao, ngay_dat_hang, ngay_giao_hang, ngay_thanh_toan, trang_thai, id_hinh_thuc_thanh_toan, id_nhan_vien, id_tai_khoan, id_voucher) values ('HD1', 512, N'Phong', N'Hà Tĩnh', '8191706997', N'Lặn xuống đáy biển', '2015-05-18', '2011-05-26', '2021-07-07', '2015-10-02', 2, 1, 1, 1, 1);
insert into hoa_don (ma, tong_tien, ten_nguoi_nhan, dia_chi, so_dien_thoai, ghi_chu, ngay_tao, ngay_dat_hang, ngay_giao_hang, ngay_thanh_toan, trang_thai, id_hinh_thuc_thanh_toan, id_nhan_vien, id_tai_khoan, id_voucher) values ('HD2', 643, N'Hằng', N'Phú Thọ', '2470241324', N'Chui xuống hầm mộ', '2002-05-14', '2015-09-06', '2012-02-22', '2022-01-09', 2, 2, 2, 2, 2);



select * from hoa_don







insert into hoa_don_chi_tiet (so_luong, don_gia, gia_ban, thanh_tien, trang_thai, id_hoa_don, id_chi_tiet_san_pham) values (261, 71, 783, 105, 3, 1, 1);
insert into hoa_don_chi_tiet (so_luong, don_gia, gia_ban, thanh_tien, trang_thai, id_hoa_don, id_chi_tiet_san_pham) values (228, 832, 193, 863, 2, 2, 2);


select * from hoa_don_chi_tiet