shifty-backend/.sqlx/query-c4cb7c4ac52ee81fb6f61e2399b308d2ac6e11103dd2cfb0f8db60d562ff03df.json
2024-06-23 18:12:54 +02:00

44 lines
1.5 KiB
JSON

{
"db_name": "SQLite",
"query": "\n SELECT\n sales_person.id as sales_person_id,\n sum((STRFTIME('%H', slot.time_to) + STRFTIME('%M', slot.time_to) / 60.0) - (STRFTIME('%H', slot.time_from) + STRFTIME('%M', slot.time_from))) as hours,\n booking.calendar_week, booking.year, slot.day_of_week\n FROM slot\n INNER JOIN booking ON (booking.slot_id = slot.id AND booking.deleted IS NULL)\n INNER JOIN sales_person ON booking.sales_person_id = sales_person.id\n WHERE sales_person.id = ?\n AND booking.year = ?\n AND booking.calendar_week <= ?\n GROUP BY year, calendar_week, day_of_week\n ",
"describe": {
"columns": [
{
"name": "sales_person_id",
"ordinal": 0,
"type_info": "Blob"
},
{
"name": "hours",
"ordinal": 1,
"type_info": "Float"
},
{
"name": "calendar_week",
"ordinal": 2,
"type_info": "Int64"
},
{
"name": "year",
"ordinal": 3,
"type_info": "Int64"
},
{
"name": "day_of_week",
"ordinal": 4,
"type_info": "Int64"
}
],
"parameters": {
"Right": 3
},
"nullable": [
false,
true,
false,
false,
false
]
},
"hash": "c4cb7c4ac52ee81fb6f61e2399b308d2ac6e11103dd2cfb0f8db60d562ff03df"
}