-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathquery_targets.sql
68 lines (68 loc) · 1.32 KB
/
query_targets.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
select
pid,
did,
fips,
-- address,
zipcode,
sfr,
-- buyer_occupied,
seller_occupied,
square_footage,
year_built,
equity,
estimated_value,
tax_assessed_value,
seller_name,
buyer_name,
-- grantee_mail_address_line_1,
-- grantee_mail_address_last_line,
document_type,
distress_circumstance,
transfer_type,
-- buyer_count,
-- deals_per_year,
-- is_flip,
length_of_ownership,
-- length_of_ownership_days,
-- recording_date,
-- prior_recording_date,
sale_amount,
-- prior_sale_amount,
-- profit,
-- profit_margin,
-- household_id,
-- est_household_income,
est_household_income_val,
-- mosaic_household,
-- mosaic_zip4,
mosaic_hh_val,
mosaic_zip4_val,
mosaic_diff,
-- ratio_sale_tax_raw,
-- ratio_sale_avm_raw,
-- ratio_sale_tax,
-- ratio_sale_avm,
-- discount_sale_tax,
-- discount_sale_avm,
-- discount_sale_tax_pctile,
-- discount_sale_avm_pctile,
-- anti_corp_seller,
anti_distress,
anti_fake_deal,
anti_short_sale,
anti_bad_name,
anti_sqft,
anti_yearbuilt,
anti_est_value,
-- target_flip,
-- target_buyer_count,
-- target_sale_tax,
-- target_sale_avm,
-- target_corp,
-- target,
-- is_target,
-- is_validated,
if(is_target is null, target, is_target) audantic_target
-- dt_update
from live_loop_target
where fips='17031';