A password is required to access to prevent 'bots; request password by emailing ed at azbikelaw dot org , or tweet at @azbikelaw
A password is required to access to prevent 'bots; request password by emailing ed at azbikelaw dot org , or tweet at @azbikelaw
mysql -h localhost -u asdmuser -ppassword -D asdm -e "SELECT eViolation1 ,count(1) FROM 2011_person GROUP BY 1 ORDER BY 1 ASC LIMIT 50;"Here are some sample queries
SELECT UnitNumber,count(1) FROM 2011_unit WHERE UnitTypeDesc='PEDALCYCLIST' GROUP BY 1 ORDER BY 1 ASC; SELECT * FROM 2011_person PROCEDURE ANALYSE ( ); SELECT IncidentID,IncidentDateTime,Onroad,CrossingFeature FROM 2010_incident i WHERE EXISTS (SELECT 1 FROM 2010_unit u WHERE u.IncidentID=i.IncidentID AND u.eUnitType IN ('PEDALCYCLIST')) AND IncidentDate="2010-09-23" ORDER BY IncidentDateTime; SELECT count(*) FROM 2013_person WHERE ePersonType LIKE 'PEDAL%' AND eInjuryStatus LIKE 'FATAL%';This will dump out the column headings (note that personPhy is just a view of person)
DESCRIBE asdm.incident; DESCRIBE asdm.personPhy; DESCRIBE asdm.unit; DESCRIBE asdm.LOVCity; DESCRIBE asdm.LOVCounty; DESCRIBE asdm.LOVState; DESCRIBE asdm.LOVNcic; DESCRIBE fars.incident; DESCRIBE fars.person; DESCRIBE fars.vehicle; DESCRIBE fars.PBType; DESCRIBE fars.LOV;Handy FARS/PBCAT query to select and split only cyclist fatals by items in either incident, person, or pbcat tables... Note it returns exactly one record for each cyclist fatality, for example 618 in 2010, and 677 in 2011. (and note that that is slightly different than counting the number of crashes).
SELECT eBIKEPOS,sUrbanRural, eBIKEDIR, count(1) FROM ((( 2011_incident as i JOIN 2011_person AS p_bike ON (i.ST_CASE = p_bike.ST_CASE AND p_bike.eINJ_SEV LIKE ('Fatal%') AND p_bike.ePER_TYP IN ('Bicyclist', 'Other Cyclist') )) JOIN 2011_vehicle as vehicle ON (i.ST_CASE = vehicle.ST_CASE AND vehicle.VEH_NO=1 )) JOIN 2011_PBType AS pbtype ON (i.ST_CASE = pbtype.ST_CASE AND p_bike.PER_NO=pbtype.PER_NO)) GROUP BY 1,2, 3 ;