37 lines
1.0 KiB
JSON
37 lines
1.0 KiB
JSON
{
|
|
"db_name": "PostgreSQL",
|
|
"query": "\n select\n trunc(extract(days from ($2::timestamptz - (stats->>$3)::date)) / 365)::text as \"key!\",\n answer,\n count(*) as \"count!\"\n from responses\n where question_id = $1\n and stats->>$3 is not null\n group by 1, answer\n order by answer\n ",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"ordinal": 0,
|
|
"name": "key!",
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"ordinal": 1,
|
|
"name": "answer",
|
|
"type_info": "Int2"
|
|
},
|
|
{
|
|
"ordinal": 2,
|
|
"name": "count!",
|
|
"type_info": "Int8"
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Uuid",
|
|
"Timestamptz",
|
|
"Text"
|
|
]
|
|
},
|
|
"nullable": [
|
|
null,
|
|
false,
|
|
null
|
|
]
|
|
},
|
|
"hash": "18e9c0600ee144cc8076c873000a6b0cd74c7504be0f9bd6769560ab72af0f6b"
|
|
}
|