Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
> In SQL, is there a way to count the number of rows that have distinct
> multi-column keys? It seems that the count function does not accept a
> distinct expression with multiple columns.
Every time I need the same thing, I use the following
commands:
SELECT DISTINCT k1,k2,k3 FROM tbl INTO TEMP tmp_tbl;
SELECT COUNT(*) FROM tmp_tbl;
-------------------------
Carlos Antonio Ruiz G'mez
dmys2@colomsat.net.co
Santaf' de Bogot' D. C.
Colombia, Suram'rica
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.