Subject | Re: [firebird-support] How to return the value of a sub-query as a field in the resulting table |
---|---|
Author | Alexandre Benson Smith |
Post date | 2011-04-07T20:21:10Z |
Em 7/4/2011 17:07, cornievs escreveu:
Select A.CLIENT, B.NAME, SUM(A.POINTS) FROM POINTS A JOIN CLIENTS B ON A.CLIENT = B.CODE WHERE A.PROMOTION = 3 GROUP BY A.CLIENT, B.Name order by A.Client
Select A.CLIENT, B.NAME, SUM(A.POINTS) FROM POINTS A JOIN CLIENTS B ON A.CLIENT = B.CODE WHERE A.PROMOTION = 3 GROUP BY A.CLIENT, B.Name order by B.Name
Select A.CLIENT, B.NAME, SUM(A.POINTS) FROM POINTS A JOIN CLIENTS B ON A.CLIENT = B.CODE WHERE A.PROMOTION = 3 GROUP BY A.CLIENT, B.Name order by 3
see you !
> Select A.CLIENT, B.NAME, SUM(A.POINTS) FROM POINTS A JOIN CLIENTS B ON A.CLIENT = B.CODE WHERE A.PROMOTION = 3 GROUP BY A.CLIENTevery filed that is not an aggregate must be in the group list.
Select A.CLIENT, B.NAME, SUM(A.POINTS) FROM POINTS A JOIN CLIENTS B ON A.CLIENT = B.CODE WHERE A.PROMOTION = 3 GROUP BY A.CLIENT, B.Name order by A.Client
Select A.CLIENT, B.NAME, SUM(A.POINTS) FROM POINTS A JOIN CLIENTS B ON A.CLIENT = B.CODE WHERE A.PROMOTION = 3 GROUP BY A.CLIENT, B.Name order by B.Name
Select A.CLIENT, B.NAME, SUM(A.POINTS) FROM POINTS A JOIN CLIENTS B ON A.CLIENT = B.CODE WHERE A.PROMOTION = 3 GROUP BY A.CLIENT, B.Name order by 3
see you !