Last active
May 20, 2022 11:32
-
-
Save kryzhovnik/de8b6bd2016543edd7b37de30db3c21f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT year, | |
manufacturer_number, | |
customer_name_and_address, | |
examination_date, | |
protocols.next_examination_date, | |
users.name as verifier_name, | |
users.initials as verifier_initials, | |
protocols.number as protocol_number, | |
null, | |
modification, | |
state_register_number, | |
type_of_me, | |
water_temperature, | |
atmosphere_pressure, | |
humidity, | |
air_temperature, | |
measurement_1, | |
measurement_2, | |
measurement_3, | |
initial_measurement, | |
consumption_1, | |
consumption_2, | |
consumption_3, | |
cities.code as city_code, | |
tool_1, tool_2, tool_3, tool_4, tool_5, tool_6, | |
proto_set_id, | |
protocols.standart_pov, protocols.si_pov, | |
cities.address, cities.kpp, cities.name, | |
delta_1, delta_2, delta_3, | |
bids.created_at as bid_created_at | |
FROM protocols | |
LEFT JOIN users ON users.id = protocols.verifier_id | |
LEFT JOIN cities ON cities.id = users.city_id | |
LEFT JOIN proto_sets ON protocols.proto_set_id = proto_sets.id | |
LEFT JOIN bids ON bids.id = protocols.bid_id | |
where proto_sets.id = "locked"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment