0

hello.. i have a table name paintshop and have 4 fields
for example

table:paintshop
bodyNo | defect_code | qty | date
58786859 | FM | 9 | 2011-11-29
58786859 | BB | 1 | 2011-11-29
58786859 | TN | 4 | 2011-11-29
58786860 | RN | 7 | 2011-11-29
58786851 | LM | 9 | 2011-11-29

I want to count the bodyNo only for 2011-11-29 and display the numbers of bodyNo = 3 ( do not count the repeating bodyNo)

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by shamsidah
1
SELECT count(DISTINCT bodyNo) FROM paintshop WHERE `date`='2011-11-29'

Edited by |-|x: n/a

0
SELECT count(DISTINCT bodyNo) FROM paintshop WHERE `date`='2011-11-29'

dear Hearth, thanks you very much for ur helps...:)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.