Show personal stats #188

Open
opened 2024-01-23 10:34:52 +01:00 by philipp · 0 comments
Owner

Rowed km, grouped by year:

SELECT 
    u.name, 
    CAST(SUM(l.distance_in_km) AS INTEGER) AS rowed_km,
    strftime('%Y', l.arrival) AS year
FROM user as u
INNER JOIN 
    rower r ON u.id = r.rower_id
INNER JOIN 
    logbook l ON r.logbook_id = l.id
WHERE 
    l.distance_in_km IS NOT NULL AND 
    u.name like '<name>' 
GROUP BY year;

Rowed km, grouped by year: ```sql SELECT u.name, CAST(SUM(l.distance_in_km) AS INTEGER) AS rowed_km, strftime('%Y', l.arrival) AS year FROM user as u INNER JOIN rower r ON u.id = r.rower_id INNER JOIN logbook l ON r.logbook_id = l.id WHERE l.distance_in_km IS NOT NULL AND u.name like '<name>' GROUP BY year; ```
philipp added the
feature
label 2024-01-24 22:49:20 +01:00
philipp added the
Someday
label 2024-03-04 23:32:28 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Ruderverein-Donau-Linz/rowt#188
No description provided.