
SQL
DwyanePeng
这个作者很懒,什么都没留下…
展开
-
查询表中第一个下订单的用户id和订单id
滴滴笔试题order_list表:userid,orderid,start_timeselect userid,orderid from order_list awhere(select count(*) from order_list b where b.start_time<a.start_time)<=1 selectuserid,orderidf...原创 2019-08-29 17:33:40 · 2511 阅读 · 0 评论 -
python 读取本地excel存入数据库
import pandas as pdimport osfrom read_pgdata import Postgredataroot_dir = r'root'file_names = os.listdir(root_dir)[:-1]print(len(file_names), file_names)pg = Postgredata()for i in range(len(...原创 2019-09-02 11:44:40 · 590 阅读 · 0 评论 -
mysql查询在一个表而不在另一个表中的数据
select C.company_name,C.company_address from Companylist C left join "company_LoAndLa" L on C.company_name=L.company_name where L.company_name is null其他两种写法:select distinct A.ID from A where A.I...原创 2019-09-18 09:10:25 · 685 阅读 · 0 评论