Tester

0

Please login or register to vote for this query.

(click on this box to dismiss)

Gardening and Landscaping

Q&A for gardeners and landscapers

CREATE TABLE #tbl(
	rater_id	VARCHAR(3),
	facility_code	VARCHAR(15),
	rate_one		INT,
    rate_two        INT
);
INSERT INTO #tbl VALUES
('1',	'123',	NULL,	NULL),
('2',	'123',	NULL,	NULL),
('3',	'123',	1,	NULL),
('4',	'123',	1,	NULL),
('5',	'888',	0,	NULL),
('6',	'888',	1,	NULL),
('7',	'888',	1,	NULL),
('8',	'888',	2,	NULL),
('9',	'69420',	3,	NULL);

SELECT COUNT(rater_id)

FROM #tbl
WHERE facility_code = '123'
GROUP BY rater_id;

DROP TABLE #tbl;

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results