diff --git a/src/sql/0-run-first/1-sanitize_init.sql b/src/sql/0-run-first/1-sanitize_init.sql index 194bfe3..05724b3 100644 --- a/src/sql/0-run-first/1-sanitize_init.sql +++ b/src/sql/0-run-first/1-sanitize_init.sql @@ -33,17 +33,3 @@ ALTER TABLE project_lifecycle CREATE OR REPLACE INDEX lifecycle_timestamp on project_lifecycle (timestamp); CREATE OR REPLACE INDEX lifecycle_newval on project_lifecycle (new_value); - -######### technician categories ############## - -CREATE OR REPLACE TABLE technician_category AS -SELECT DISTINCT users.email, - CONCAT(SUBSTR(ap.refnum, 1, 3), ' - ', - IF(ap.proj_type = 'Warranty', 'Structural', ap.proj_type)) AS flavor, - count(email) AS count -FROM users - INNER JOIN dispatch d ON users.pkey = d.dispatched_to - INNER JOIN all_projects ap ON d.project_fkey = ap.refnum -#where date_dispatched between NOW() - INTERVAL 180 DAY AND NOW() -GROUP BY flavor, email -ORDER BY count DESC; diff --git a/src/sql/0-run-first/contributions.sql b/src/sql/0-run-first/contributions.sql index 143344a..2c36eba 100644 --- a/src/sql/0-run-first/contributions.sql +++ b/src/sql/0-run-first/contributions.sql @@ -45,7 +45,7 @@ DROP TABLE IF EXISTS rdu_soil_contributions; CREATE TABLE rdu_soil_contributions AS -SELECT CONCAT(users.lname, ', ', users.fname) AS `Engineer`, +SELECT CONCAT(users.email) AS `Technician Email`, project_lifecycle.project_number AS `Project Number`, project_lifecycle.timestamp, new_value AS `Action Type`,