SQL
iteye_16559
这个作者很懒,什么都没留下…
展开
-
having语法
select b.name, sum(c.count) from websites b inner join access_log c on b.id = c.site_id group by c.site_id having sum(c.count) > 500原创 2016-12-01 21:36:44 · 129 阅读 · 0 评论 -
select结果作为新表
[code="java"]SELECT A FROM (SELECT A,B FROM TABLE) T where A='XXXX';[/code] [code="java"]select name, count from (select b.name name, sum(c.count) count from websites b inner join access_log c o...原创 2016-12-01 21:43:32 · 6111 阅读 · 0 评论