我需要执行以下操作:
从表交付中选择用户名,其中日期>“2012-06-01 00:00:00”,然后从客户订单中获取IP ,并删除重复的用户名(全部基于选择的第一个用户名)。
select Username from delivery where date>"2012-06-01 00:00:00"
INNER JOIN Customers d
ON c.Username = d.Username order by IP asc;
它不工作,任何想法?
编辑:
select Username from delivery c
INNER JOIN Customers d
ON c.Username = d.Username
where date>"2012-06-01 00:00:00"
order by IP asc;