Open john-potts opened 2 years ago
This is currently being accomplished with the following query
select u.first_name,
u.last_name,
u.id user_id,
max(lock_in) most_recent_visit,
min(lock_in) first_visit
from kos.authentications a
join kos.users u on a.user_id = u.id
where u.id = <user_id>
group by u.id
limit 100;
We need a portal/report be created so that a non-technical BOD member do this? having to do DB queries is not an easy thing for people that do not have access or understand how the backend works. Also this report should show what door and tools where used with their fob
-- who used the table saw in the last 48 hours
select a.lock_in,
concat(u.first_name, ' ', u.last_name) full_name,
g.name gatekeeper
from kos.authentications a
join kos.users u on a.user_id = u.id
join kos.gatekeepers g on a.gatekeeper_id = g.id
where a.created_at >= now() - interval 2 day
order by 1
I would like to be able to specify a member and a range of time, and receive a report stating whether or not they used their fob within that time period.
this is intended to be used in distinguishing "abandoned" memberships vs members who used the space without paying and were subsequently terminated for non-payment.