wip: currently rewriting the project as a full stack application
tangled.org/kacaii.dev/sigo
gleam
1-- Occurrence reports
2select
3 o.id as occurrence_id,
4 o.created_at as reported_timestamp,
5 o.arrived_at as arrival_timestamp,
6 o.resolved_at as resolved_timestamp,
7 o.occurrence_category,
8 o.occurrence_subcategory,
9 o.priority,
10 u_applicant.full_name as applicant_name,
11 u_applicant.user_role as applicant_role,
12 o.occurrence_location[1] as latitude,
13 o.occurrence_location[2] as longitude
14from
15 public.occurrence as o
16left join
17 public.user_account as u_applicant
18 on o.applicant_id = u_applicant.id
19order by
20 o.created_at desc;