473,320 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

MIN(Count(*))

Hi Guys,

I am very new to SQL..i was trying out some queries..but got stuck here..
I am trying to get least value from a result set. Basically i have to get min value of count(*) .. how do i do that without using TOP query?..

Any ideas would be appreciated.

Thanks
shu
Jun 11 '06 #1
2 10808
get least value from a result set. Basically i have to get min value of count(*)

what do u mean by getting the min value of count(*) ?!
count(*) function returns the number of records table contains. so it's only one value !
and MIN function returns the lowest value in all records !
so logicaly u can't use both.
May be I missunderstand u, tell me if u mean something else plz

Best wishes
Hesham el ebrashy
Jul 8 '06 #2
sashi
1,754 Expert 1GB
Hi there,

below are sample SQL statement.. hope it helps you to get started.. good luck my fren.. :)

The COUNT(*) function returns the number of selected rows in a selection
Expand|Select|Wrap|Line Numbers
  1. SELECT COUNT(*) FROM table
  2.  
The COUNT(column) function returns the number of rows without a NULL value in the specified column
Expand|Select|Wrap|Line Numbers
  1. SELECT COUNT(column) FROM table
  2.  
The MAX function returns the highest value in a column. NULL values are not included in the calculation
Expand|Select|Wrap|Line Numbers
  1. SELECT MAX(column) FROM table
  2.  
The MIN function returns the lowest value in a column. NULL values are not included in the calculation
Expand|Select|Wrap|Line Numbers
  1. SELECT MIN(column) FROM table 
  2.  
Jul 8 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Alex Ivascu | last post by:
Hi; I am no PHP programmer, unfortunately. So your assistance is appreciated. I am starting to look into using the Agora Shopping cart. There is a page in there called productPage.inc and I...
4
by: princeofcode | last post by:
Hey all, The following function counts for number of characters in a text area and displays error msg when it exceeds a maximum limit I would like to optimize this function so that its highly...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.