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
 
Back
Top