on 01-26-2016 5:04 PM
Hi, I want to find out the most common values for field "x", and "x" is a measure with DECIMAL type. So I ran the following pass-through-sql, The output has only 1 record with some random value for "x". I know "x" has many different values. Can someone help? Thanks.
SELECT "x", count(*) as cnt
FROM "table1"
GROUP BY "x"
ORDER BY cnt DESC
Can you be more specific with your problem and include the schema of the table in question, the data in the table, the results you are seeing, and the verison and build number of the database engine that you are running? The SQL below (using a recent build of 16.0.0) works fine for me.
Reg
PS: Apologies for the screenshot. I was having trouble pasting text into the response for some reason.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.