multiple query same table but in different columns mysql

后端 未结 4 2130
误落风尘
误落风尘 2020-11-22 09:28

I\'m trying to get more columns summarizing the result from 2 different tables

SET @start_res = 20150301;
SET @finish_res= 20150501;
SET @finish_check= 20150         


        
4条回答
  •  无人及你
    2020-11-22 10:06

    In SQL Server 2005+, you can use Window functions. But it isn't supported in MySQL.

    In Subquery, select statements must have join operator. Like this:

    SELECT * FROM (
        (SELECT COUNT(..) ...) AS C1
           INNER JOIN (SELECT COUNT(...) ...) AS C2
                ON 
           INNER JOIN ... )
    

提交回复
热议问题