From 718e801639d63cd2d255c4bd3a0b26e11c69be84 Mon Sep 17 00:00:00 2001 From: pugtaqk8r <2550434181@qq.com> Date: Sun, 29 Dec 2024 10:25:28 +0800 Subject: [PATCH] ADD file via upload --- 查询.sql | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 查询.sql diff --git a/查询.sql b/查询.sql new file mode 100644 index 0000000..9c466d9 --- /dev/null +++ b/查询.sql @@ -0,0 +1,35 @@ +-- 查询所有客户信息 +SELECT * FROM customers; + +-- 查询电话号码中包含11的所有客户 +SELECT * FROM customers WHERE T_phone LIKE '%11%'; +-- 查询所有菜单项信息 +SELECT * FROM menu_items; + +-- 查询价格在10到20之间的所有菜单项 +SELECT * FROM menu_items WHERE M_price BETWEEN 10 AND 20; +-- 查询所有折扣规则信息 +SELECT * FROM discount_rules; + +-- 查询折扣大于0.8的所有折扣规则 +SELECT * FROM discount_rules WHERE discount > 0.8; +-- 查询所有餐桌信息 +SELECT * FROM tables; + +-- 查询状态为占用的所有餐桌 +SELECT * FROM tables WHERE Cz_zt = '占用'; +-- 查询所有员工信息 +SELECT * FROM workers; + +-- 查询工资大于5000的所有员工 +SELECT * FROM workers WHERE W_salary > 5000; +-- 查询所有订单信息 +SELECT * FROM orders; + +-- 查询所有服务员为03的订单 +SELECT * FROM orders WHERE W_id = '03'; +-- 查询所有账单信息 +SELECT * FROM bills; + +-- 查询所有金额大于30的账单 +SELECT * FROM bills WHERE S_price > 30; \ No newline at end of file