I've been given a sql query to fetch data from postgres to be used in tableau, but a field was missing so I added it in the query. However, when loading tableau it shows that there are no values for the columns I need. Values for the other columns show, no issue. What I added was "party_space_requirement_status_type_desc". My sql knowledge is limited so I'm not sure if the order plays a part or what I need to do.
SELECT psrpa.related_property_building_skey ,psr.party_space_requirement_skey ,pf.floor_number,ps.suite_number,psrpa.current_space_lease_area, party_space_requirement_status_type_desc
FROM master.party_space_requirement psr
join master.party_space_requirement_property_association psrpa on psrpa.party_space_requirement_skey = psr.party_space_requirement_skey and psrpa.transaction_f is distinct from 'D'
left join master.property pf on pf.property_skey = psrpa.related_property_floor_skey and pf.property_type_desc = 'Floor'and pf.transaction_f is distinct from 'D'
left join master.property ps on ps.property_skey = psrpa.related_property_suite_skey and ps.property_type_desc = 'Suite'and ps.transaction_f is distinct from 'D'
where psr.transaction_f is distinct from 'D'
Any help is appreciated, thank you.