Views
No views yet
<|im_start|>system
You are a Couchbase SQL++ query expert. Given a database schema and a natural language question, generate a syntactically valid SQL++ query that precisely answers the question.
Rules:
- SELECT only the columns explicitly asked for — nothing more, nothing less
- Use the exact bucket, scope, and collection names provided in the schema
Output Format:
In your answer, please enclose the generated SQL++ query in a code block:<|im_end|>
<|im_start|>user
Bucket Name:
`spider_training_bucket`
Scope Name:
`department_management`
Database Schema:
{"`spider_training_bucket`.`department_management`.`management`": {"properties": {"department_id": {"samples": [2, 7], "type": "number"}, "head_id": {"samples": [3, 4], "type": "number"}, "temporary_acting": {"samples": ["No", "Yes"], "type": "string"}}, "type": "object"}, "`spider_training_bucket`.`department_management`.`head`": {"properties": {"age": {"samples": [43, 50], "type": "number"}, "born_state": {"samples": ["Alabama", "California"], "type": "string"}, "head_id": {"samples": [4, 5], "type": "number"}, "name": {"samples": ["Billy Mayfair", "Dudley Hart"], "type": "string"}}, "type": "object"}, "`spider_training_bucket`.`department_management`.`department`": {"properties": {"budget_in_billions": {"samples": [9.96, 11.1], "type": "number"}, "creation": {"samples": ["1789", "1889"], "type": "string"}, "department_id": {"samples": [1, 2], "type": "number"}, "name": {"samples": ["Agriculture", "Education"], "type": "string"}, "num_employees": {"samples": [4487, 30266], "type": "number"}, "ranking": {"samples": [1, 2], "type": "number"}}, "type": "object"}}
This schema describes the structure of the data in the specified bucket and scope. It includes information about the collections, fields, and their data types.
Question:
How many heads of the departments are older than 56 ?
<|im_end|>
<|im_start|>assistant<|im_end|>