From: gamesguru Date: Tue, 29 Sep 2020 20:41:15 +0000 (-0400) Subject: add measurements X-Git-Tag: 0.0.0~14 X-Git-Url: https://git.nutra.tk/v1?a=commitdiff_plain;h=fcc77cdd44485ea729655d5d564818ac6c229f3e;p=nutratech%2Fnt-sqlite.git add measurements --- diff --git a/sql/data/bio_log_entry.csv b/sql/data/bio_log_entry.csv index 4961acf..4d3f3f7 100644 --- a/sql/data/bio_log_entry.csv +++ b/sql/data/bio_log_entry.csv @@ -30,22 +30,22 @@ log_id,biometric_id,value 10,2,67 10,3,17.2 10,4,21.6 -10,5, -10,6, -10,7, -10,8, -10,9, -10,10, -10,11, -10,12, -10,13, -10,14, -10,15, -10,16, -10,17, -10,18, -10,19, -10,20, +10,5,93.345 +10,6,28.575 +10,7,50.8 +10,8,35.56 +10,9,109.22 +10,10,78.74 +10,11,91.44 +10,12,38.1 +10,13,26.67 +10,14,10 +10,15,15 +10,16,14 +10,17,13 +10,18,10 +10,19,12 +10,20,9 11,22,53 11,23,91 11,24,60 @@ -56,28 +56,28 @@ log_id,biometric_id,value 13,23,105 13,24,62 14,2,8.71 -14,5, -14,6, -14,9, -14,10, -14,12, +14,5,24.13 +14,6,10.795 +14,9,50.8 +14,10,46.355 +14,12,31.75 15,2,74 -15,5, -15,6, -15,7, -15,8, -15,9, -15,10, -15,11, -15,12, -15,13, -15,14, -15,15, -15,16, -15,17, -15,18, -15,19, -15,20, +15,5,100.965 +15,6,28.575 +15,7,55.245 +15,8,37.465 +15,9,115.57 +15,10,86.995 +15,11,95.25 +15,12,38.1 +15,13,26.67 +15,14,19 +15,15,34 +15,16,14 +15,17,18 +15,18,12 +15,19,13 +15,20,15 16,22,59 16,23,103 16,24,63 diff --git a/sql/functions.sql b/sql/functions.sql index a503c28..a0d4a4e 100644 --- a/sql/functions.sql +++ b/sql/functions.sql @@ -40,7 +40,7 @@ WHERE users.name = 'Mark'; -------------------------------- --- Meas, skinfolds, statics +-- Height, wrist, ankle -------------------------------- SELECT @@ -63,6 +63,35 @@ WHERE OR wrist.value OR ankle.value; + +-------------------------------- +-- Measurements (cm) +-------------------------------- + +SELECT + date, + users.name, + chest.value AS chest + -- thigh.value AS thigh, + -- calf.value AS calf, + -- shoulders.value AS shoulders, + -- waist.value AS waist, + -- hips.value AS hips, + -- neck.value AS neck, + -- forearm.value AS forearm +FROM + biometric_log + INNER JOIN users ON user_id = users.id + LEFT JOIN bio_log_entry chest ON chest.biometric_id = 5 + AND chest.log_id = biometric_log.id + WHERE + chest.value; + + +-------------------------------- +-- Skinfolds (mm) +-------------------------------- + -------------------------------- -- OLD: pulse/bp --------------------------------