SQL query construction

  • Thread starter Thread starter blake7
  • Start date Start date
B

blake7

Hi, I have a table as below and I want to create a query to count the fault
type against the product, I have shown below how i want the query to return
the findings etc, can anyone help. Thanks in advance

PRODUCT FAULTY TYPE
iron customer complaint
television ok
telephone warranty
iron internal issue
iron health & safety
iron ok
iron warranty
iron ok
iron internal issue

what I want
PRODUCT FAULT TYTPE TOTAL
iron customer complaint 1
ok 2
internal issue 2
warranty 1
health & safety 1
 
Based on your description, it looks a little like you could use a totals
query, grouping on the "type" and counting the records. Check Access HELP
for "totals query".

By the way, none of your example records are simply "ok", so how are you
getting "ok 2"?

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
 
Hi Jeff, thnaks for the reply
I think the way the table info looks when you post it in here changes, below
i have done it again, there are two instances were 2 x "ok" appear in the
fault column against "iron", would you be able to steer me with a little more
info on how to assemble the query ? Thanks Tony

PRODUCT FAULT TYPE
iron customer complaint
television ok
telephone warranty
iron internal issue
iron health & safety
iron ok
iron warranty
iron ok
iron internal issue


what I want

PRODUCT FAULT TYPE TOTAL
iron customer complaint 1
ok 2
internal issue 2
warranty 1
health & safety 1
 
Back
Top