Question

  • Thread starter Thread starter a
  • Start date Start date
A

a

I have theis table

sereial room type Name JoinKey
1 DBL absfcii 1
2 DBL gfgfh 1

3 SNGL kkjjjk 2
4 SNGL sdjfksd 2

The Question Is
How can i count DBL in JoinKey 1 as (ONE) Only
How can I count SNGL in JoinKey 2 as (ONE) Only
 
This SQL will do it. It assumes that the tablename is tblRooms.
Note that you should not have a field named NAME. Change it to something
like RmName.
I also removed the space from Room Type.

SELECT tblRooms.Serial, tblRooms.RoomType, Count(tblRooms.JoinKey) AS
CountOfJoinKey
FROM tblRooms
GROUP BY tblRooms.Serial, tblRooms.RoomType;

UpRider
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top