SELECT DISTINCT a.AreaID AS Expr1, b.*, c.* FROM ysee_NetHo_Agents_1(0) a INNER JOIN b ON a.AreaID = b.AreaID INNER JOIN c ON c.ID = b.AreaID把DISTINCT a.AreaID 时 SQL 自己+了 AS Expr1。 但是结果中不想要这列
5楼对的。SELECT b.*, c.* from a,b,c group by b.col1,b.col2,...b.coln,c.col1,c.col2,...c.coln
select b.*,c* from ( SELECT DISTINCT a.AreaID AS AS Expr1, b.*, c.* ) t
直接去掉不行?
SELECT DISTINCT a.AreaID, b.*, c.* ..
select * from (select distinct areaid from a) a join b on..join c on..
--
SELECT DISTINCT b.*, c.*
a.AreaID AS Expr1, b.*,
c.*
FROM ysee_NetHo_Agents_1(0) a INNER JOIN
b ON
a.AreaID = b.AreaID INNER JOIN
c ON c.ID = b.AreaID把DISTINCT
a.AreaID 时 SQL 自己+了 AS Expr1。
但是结果中不想要这列
from a,b,c
group by b.col1,b.col2,...b.coln,c.col1,c.col2,...c.coln
SELECT DISTINCT a.AreaID AS AS Expr1, b.*, c.* ) t