Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.
SELECT grade_level, MAX(CASE WHEN rn = 1 THEN cnt END) first_result, MAX(CASE WHEN rn = 2 THEN cnt END) second_result, MAX(CASE WHEN rn = 3 THEN cnt END) third_result, SUM(cnt) total_enrolled FROM (SELECT q.*, ROW_NUMBER() OVER(PARTITION BY grade_level ORDER BY home_room) rn FROM ( SELECT grade_level, home_room, COUNT(*) cnt FROM students WHERE enroll_status = 0 AND schoolid IN (3) GROUP BY home_room, grade_level) q) GROUP BY grade_level ORDER BY grade_level;
|I want to write a query to populate column values based on another column||1||32|
|SQL Help joining two tables||7||33|
|Schema creation in Oracle12c||6||23|
|SQL Retrieve Values||4||41|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
16 Experts available now in Live!