倪美佳

2020-04-29   阅读量: 617

Mysql

SQL面试题1

扫码加入数据分析学习群

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;

添加CDA认证专家【维克多阿涛】,微信号:【cdashijiazhuang】,提供数据分析指导及CDA考试秘籍。已助千人通过CDA数字化人才认证。欢迎交流,共同成长!
1.2064 4 3 关注作者 收藏

评论(0)


暂无数据

推荐课程