Forked from samedelstein/gist:ca99a696f844b771cc08cca32381cf5b
Last active
February 14, 2017 20:11
-
-
Save millzpaugh/4723c4152a811cecea8d22e20f64239d to your computer and use it in GitHub Desktop.
IPS SQL queries
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
--/api/business_license/application_data/complaint_id | |
SELECT * | |
FROM [Building].[dbo].[Complaint] c | |
left outer JOIN [Building].[dbo].[User_Defined_Action] uda | |
ON c.complaint_id = uda.parent_id | |
left outer JOIN [Building].[dbo].[User_Defined_Action_Type] udat | |
ON uda.user_defined_action_type_id = udat.user_defined_action_type_id | |
WHERE c.complaint_number = 'CU2014-0050' | |
--/api/business_license/inspection_data/complaint_id | |
SELECT * | |
FROM [Building].[dbo].[Complaint] c | |
join [Building].[dbo].[Inspection] i | |
ON c.transaction_to_property_id = i.transaction_to_property_id | |
WHERE c.complaint_number = 'CU2014-0050' | |
--/api/business_license/payment_data/complaint_id | |
SELECT * | |
from Building.dbo.Complaint c | |
join Building.dbo.Payment p | |
on c.transaction_to_property_id = p.transaction_to_property_id | |
Where complaint_number = 'CU2014-0050' | |
--/api/permit_application/application_number | |
--/api/permit_record/permit_number | |
--/api/permit_record/inspections/permit_number |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment