Changes between Version 12 and Version 13 of OnyxDatabaseReporting
- Timestamp:
- 02/25/13 15:47:57 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OnyxDatabaseReporting
v12 v13 204 204 # To find duplicates enrollment_id entries: 205 205 206 mysql -h briccsdb -u auditor -p g3s4t6briccs -e "SELECT * FROM participant ptone WHERE EXISTS (SELECT 1 FROM participant pttwo WHERE pttwo.enrollment_id = ptone.enrollment_id LIMIT 1, 1 );"206 mysql -h briccsdb -u auditor -p briccs -e "SELECT * FROM participant ptone WHERE EXISTS (SELECT 1 FROM participant pttwo WHERE pttwo.enrollment_id = ptone.enrollment_id LIMIT 1, 1 );" 207 207 208 208 209 209 # So to exclude duplicates and NULL BPt numbers: 210 210 211 mysql -h briccsdb -u auditor -p g3s4t6briccs -e "SELECT * FROM participant ptone WHERE NOT EXISTS (SELECT 1 FROM participant pttwo WHERE pttwo.enrollment_id = ptone.enrollment_id LIMIT 1, 1 ) AND barcode is not null order by enrollment_id;"211 mysql -h briccsdb -u auditor -p briccs -e "SELECT * FROM participant ptone WHERE NOT EXISTS (SELECT 1 FROM participant pttwo WHERE pttwo.enrollment_id = ptone.enrollment_id LIMIT 1, 1 ) AND barcode is not null order by enrollment_id;" 212 212 213 213 # To exclude duplicates, nulls and cancelled interviews and list barcodes (BPt numbers) and enrollment dates: 214 214 215 mysql -h briccsdb -u auditor -p g3s4t6briccs -e "SELECT barcode, start_date, status215 mysql -h briccsdb -u auditor -p briccs -e "SELECT barcode, start_date, status 216 216 FROM participant ptone, interview WHERE NOT EXISTS (SELECT 1 FROM participant pttwo WHERE pttwo.enrollment_id = ptone.enrollment_id LIMIT 1, 1 ) AND barcode is not null AND status <> 'CANCELLED' 217 217 AND ptone.id = interview.participant_id order by start_date;" > briccs_enrollment_to_date.txt … … 219 219 # To get a count of the above: 220 220 221 mysql -h briccsdb -u auditor -p g3s4t6briccs -e "SELECT count(*)221 mysql -h briccsdb -u auditor -p briccs -e "SELECT count(*) 222 222 FROM participant ptone, interview WHERE NOT EXISTS (SELECT 1 FROM participant pttwo WHERE pttwo.enrollment_id = ptone.enrollment_id LIMIT 1, 1 ) AND barcode is not null AND status <> 'CANCELLED' 223 223 AND ptone.id = interview.participant_id order by start_date;" 224 224 225