SELECT 
    * 
FROM 
    `fao-maps.fao_esa_smallholders.vw_esa_survey_rulis_lat_lon_social`
WHERE   
    (@country = "all" or @country = country)
AND 
    (var_type = @variable_type)