![]() |
|
Porsche, and the Porsche crest are registered trademarks of Dr. Ing. h.c. F. Porsche AG.
This site is not affiliated with Porsche in any way. Its only purpose is to provide an online forum for car enthusiasts. All other trademarks are property of their respective owners. |
|
![]() |
SirAndy |
![]() ![]()
Post
#1
|
Resident German ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 42,234 Joined: 21-January 03 From: Oakland, Kalifornia Member No.: 179 Region Association: Northern California ![]() |
ok, here's the problem:
let's say i have a table with 2 rows like the example below. in the second row, i have a integer status value (iStatus). i need a query that allows me to find the value that occurs the most in the table, in the example below, that would be "3". i'm not interested in how many 3s there are, all i need is to find out which iStatus value shows up the most in the table ... (IMG:style_emoticons/default/pray.gif) Attached image(s) ![]() |
![]() ![]() |
eeyore |
![]()
Post
#2
|
Senior Member ![]() ![]() ![]() Group: Members Posts: 889 Joined: 8-January 04 From: meridian, id Member No.: 1,533 Region Association: None ![]() |
select top 1 count(iStatus) as StatCount, sDescription from {tablename} group by sDescription
order by StatCount You'll need to replace "{tablename}" with the actual name |
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 1st July 2025 - 06:33 AM |
All rights reserved 914World.com © since 2002 |
914World.com is the fastest growing online 914 community! We have it all, classifieds, events, forums, vendors, parts, autocross, racing, technical articles, events calendar, newsletter, restoration, gallery, archives, history and more for your Porsche 914 ... |