Reputation: 310
I have this table:
value1-------value2------time
1 2 1440273663
1 1 1440273699
2 3 1448293763
1 1 1440273663
3 2 1440273693
And I want to count the number of unique values in column 1. For this example table, this would be 3.
Upvotes: 0
Views: 293
Reputation: 17126
You can use a query like below for a table named t
with column value1
select count(distinct value1) from t;
Here's a demo sql fiddle:http://sqlfiddle.com/#!9/2b903/1
Upvotes: 1