Article View: borland.public.cppbuilder.database.ado
Article #685SQL Problem: ORDER-ing by COUNT(something)
From: Vladimir Stefanovic
Date: Wed, 06 Jul 2005 08:06
Date: Wed, 06 Jul 2005 08:06
17 lines
1164 bytes
1164 bytes
Hi, How can I ORDER this SQL by 'Cnt', and not by 'Field'? (when I try 'ORDER BY Cnt', I got an error) SELECT Field, COUNT(Field) AS Cnt FROM Table WHERE SomeCondition GROUP BY Field ORDER BY Field Best regards, Vladimir Stefanovic
Technical Details
Message-ID:
<42cb9104$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10698b,63f511b1d62f5121,start X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Vladimir Stefanovic" <antivari@po.sbb.co.yu> Sender: "Vladimir Stefanovic" <antivari@po.sbb.co.yu> Reply-To: "Vladimir Stefanovic" <antivari@po.sbb.co.yu> Subject: SQL Problem: ORDER-ing by COUNT(something) Newsgroups: borland.public.cppbuilder.database.ado X-User-Info: 213.137.116.159 X-Forwarded-For: 128.128.129.165 NNTP-Posting-Host: 207.105.83.66 Message-ID: <42cb9104$1@newsgroups.borland.com> Date: 6 Jul 2005 01:06:28 -0700 X-Trace: newsgroups.borland.com 1120637188 207.105.83.66 (6 Jul 2005 01:06:28 -0700) Lines: 18 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail