postgresql COUNT(DISTINCT …) very slow
I have a very simple SQL query: SELECT COUNT(DISTINCT x) FROM table; My table has about 1.5 million rows. This query is running … Read more
I have a very simple SQL query: SELECT COUNT(DISTINCT x) FROM table; My table has about 1.5 million rows. This query is running … Read more
In C#, say I have a class called Note with three string member variables. public class Note { public string Title; public string … Read more
I am trying to find a MySQL query that will find DISTINCT values in a particular field, count the number of occurrences of … Read more
I have a ksh script that returns a long list of values, newline separated, and I want to see only the unique/distinct values. … Read more
If I have a table CREATE TABLE users ( id int(10) unsigned NOT NULL auto_increment, name varchar(255) NOT NULL, profession varchar(255) NOT NULL, … Read more
I am using Pandas as a database substitute as I have multiple databases (Oracle, SQL Server, etc.), and I am unable to make a … Read more
I can select all the distinct values in a column in the following ways: SELECT DISTINCT column_name FROM table_name; SELECT column_name FROM table_name … Read more
I learned something simple about SQL the other day: SELECT c FROM myTbl GROUP BY C Has the same result as: SELECT DISTINCT … Read more
SELECT DISTINCT field1, field2, field3, …… FROM table I am trying to accomplish the following sql statement but I want it to return … Read more
I need to retrieve all rows from a table where 2 columns combined are all different. So I want all the sales that … Read more