HF RL Explorer

PostgreSQL: Return Result Set as JSON Array

PostgreSQL: Return Result Set as JSON Array: a task in Terminal-Lego-15k (Harbor dataset). You are working with PostgreSQL and need to return query results as JSON arrays. Given a simple table with integer and text columns, you must write SQL queries that produce two specific JSON output formats.

The task

You are working with PostgreSQL and need to return query results as JSON arrays. Given a simple table with integer and text columns, you must write SQL queries that produce two specific JSON output formats.

Part of PrimeIntellect/Terminal-Lego-15k.