Untitled
unknown
plain_text
3 years ago
4.6 kB
7
Indexable
SELECT
count(*) AS count_1
FROM
(
SELECT
property_sov_input.id AS property_sov_input_id,
property_sov_input.loc_id AS property_sov_input_loc_id,
property_sov_input.property_id AS property_sov_input_property_id,
property_sov_input.quote_id AS property_sov_input_quote_id,
property_sov_input.address_id AS property_sov_input_address_id,
property_sov_input.inception_date AS property_sov_input_inception_date,
property_sov_input.floor_area AS property_sov_input_floor_area,
property_sov_input.number_of_buildings AS property_sov_input_number_of_buildings,
property_sov_input.number_of_stories AS property_sov_input_number_of_stories,
property_sov_input.year_built AS property_sov_input_year_built,
property_sov_input.occupancy_type_id AS property_sov_input_occupancy_type_id,
property_sov_input.construction_type_id AS property_sov_input_construction_type_id,
property_sov_input.tiv_building AS property_sov_input_tiv_building,
property_sov_input.tiv_contents AS property_sov_input_tiv_contents,
property_sov_input.tiv_business_interruption AS property_sov_input_tiv_business_interruption,
property_sov_input.tiv_total AS property_sov_input_tiv_total
FROM
property_sov_input
JOIN occupancy_type ON occupancy_type.id = property_sov_input.occupancy_type_id
JOIN construction_type ON construction_type.id = property_sov_input.construction_type_id
JOIN address ON address.id = property_sov_input.address_id
JOIN country ON country.id = address.country_id
LEFT OUTER JOIN county ON county.id = address.county_id
LEFT OUTER JOIN state ON state.id = address.state_id
) AS anon_1
SELECT
property_sov_input.id AS property_sov_input_id,
property_sov_input.loc_id AS property_sov_input_loc_id,
property_sov_input.property_id AS property_sov_input_property_id,
property_sov_input.quote_id AS property_sov_input_quote_id,
property_sov_input.address_id AS property_sov_input_address_id,
property_sov_input.inception_date AS property_sov_input_inception_date,
property_sov_input.floor_area AS property_sov_input_floor_area,
property_sov_input.number_of_buildings AS property_sov_input_number_of_buildings,
property_sov_input.number_of_stories AS property_sov_input_number_of_stories,
property_sov_input.year_built AS property_sov_input_year_built,
property_sov_input.occupancy_type_id AS property_sov_input_occupancy_type_id,
property_sov_input.construction_type_id AS property_sov_input_construction_type_id,
property_sov_input.tiv_building AS property_sov_input_tiv_building,
property_sov_input.tiv_contents AS property_sov_input_tiv_contents,
property_sov_input.tiv_business_interruption AS property_sov_input_tiv_business_interruption,
property_sov_input.tiv_total AS property_sov_input_tiv_total
FROM
property_sov_input
JOIN occupancy_type ON occupancy_type.id = property_sov_input.occupancy_type_id
JOIN construction_type ON construction_type.id = property_sov_input.construction_type_id
JOIN address ON address.id = property_sov_input.address_id
JOIN country ON country.id = address.country_id
LEFT OUTER JOIN county ON county.id = address.county_id
LEFT OUTER JOIN state ON state.id = address.state_id
LIMIT
%(param_1) s OFFSET %(param_2) s { 'param_1' : 100,
'param_2' : 0}
SELECT
address.id AS address_id,
address.street_name AS address_street_name,
address.postal_code AS address_postal_code,
address.city AS address_city,
address.county_id AS address_county_id,
address.state_id AS address_state_id,
address.country_id AS address_country_id,
address.latitude AS address_latitude,
address.longitude AS address_longitude
FROM
address
WHERE
address.id = %(pk_1) s { 'pk_1' : UUID(
'db6472b4-2ea6-46ec-8a63-fc934b20e173'
) }
SELECT
county.id AS county_id,
county.code AS county_code,
county.name AS county_name,
county.state_id AS county_state_id
FROM
county
WHERE
county.id = %(pk_1) s { 'pk_1' : UUID(
'a9a03a21-cbe5-4235-839a-7a372319e769'
) }
SELECT
state.id AS state_id,
state.code AS state_code,
state.name AS state_name,
state.country_id AS state_country_id
FROM
state
WHERE
state.id = %(pk_1) s { 'pk_1' : UUID(
'edcabdef-edc8-4394-9ecd-570e200f46fb'
) }
SELECT
country.id AS country_id,
country.code AS country_code,
country.name AS country_name
FROM
country
WHERE
country.id = %(pk_1) s { 'pk_1' : UUID(
'70617788-fadc-49c6-948f-9a7f2b4424d1'
) }
Editor is loading...