mysql中using
Posted 谦逊的铅笔
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql中using相关的知识,希望对你有一定的参考价值。
select * from ( SELECT u.utm_source ,count(DISTINCT u.mobile) as new_user -- 登记用户 FROM 表名 u WHERE u.created_time BETWEEN ‘2019-03-01 00:00:00‘ AND ‘2019-03-01 23:59:59‘ and u.utm_source in (‘param1‘,‘param2‘) GROUP BY u.utm_source ORDER BY new_user DESC ) t LEFT JOIN ( SELECT abbr as utm_source, `name`, type FROM 表名 WHERE abbr != ‘‘ ) qudao USING(utm_source) ;#limit $page,$page_count
其中的USING用法是:qudao.utm_source = u.utm_source,相当于:join 表名 as a on a.utm_source = u.utm_source
以上是关于mysql中using的主要内容,如果未能解决你的问题,请参考以下文章
[React Testing] Use Generated Data in Tests with tests-data-bot to Improve Test Maintainability(代码片段
七个办法只有一个有效:200 PORT command successful. Consider using PASV.425 Failed to establish connection.(代码片段
[TIA PORTAL][CONVERT] Convert Char Array to DInt...DInt to Char Array..Useful and easy function(代码片段
[Grid Layout] Use auto-fill and auto-fit if the number of repeated grid tracks is not to be def(代码片段