Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9091

Re: A question about Formula field or sql Expression fields (Helppppppppp)

$
0
0

p.s. if you are building a command as Dell suggested (which is the recommended / supported method) then here's an example of using a subquery (using the report above's sql)...this adds in the expression as a subquery.

 

SELECT `Customer`.`Country`, `Customer`.`Customer Name`,

(Select Distinct count("Customer2"."Customer Name") from "Customer" "Customer2" where "Customer"."Country" = "Customer2"."Country") AS CUSTCOUNT ,

(Select Max ("Customer2"."Customer Name") from "Customer" "Customer2" where "Customer"."Country" = "Customer2"."Country") AS CUSTMAX
FROM   `Customer` `Customer`
ORDER BY `Customer`.`Country`


-jamie


Viewing all articles
Browse latest Browse all 9091

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>