1. 对deposite、customer、bank进行查询,查询条件为location在广州、苏州、济南的客户,存款在300000至500000之间的存款记录,显示客户姓名name、银行名称bank_name、存款金额amount.
select customer.name, bank_name,amount,location from
deposite left join bank on deposite.b_id=bank.b_id
left join customer on deposite.c_id=customer.c_id
where (location='广州'or location='苏州' or location='济南')
and amount between 300000 and 500000 group by bank_name;
在第一节基础上 更新了函数和执行顺序:实操了字符数函数、时间函数、字段截取函数、interval函数等,除最后顺序实操因未导入数据库,导致无法执行