Cannot execute query: Unknown column 'i.instrument_type' in 'field list' for SELECT mp.parent_market_place_id, u.underlying_category, u.underlying_symbol, u.underlying_name, COALESCE(u.underlying_subcategory, u.underlying_symbol, u.underlying_name) AS group_symbol, i.instrument_type AS type FROM mdweb.instrument AS i LEFT JOIN mdweb.market_place AS mp ON i.market_place_id=mp.market_place_id LEFT JOIN mdweb.underlying AS u ON i.instrument_id=u.instrument_id WHERE NOT RIGHT(i.market_place_id, 2) = 'SP' AND NOT RIGHT (i.market_place_id, 2) = 'MP' AND NOT u.underlying_category IS NULL ORDER BY u.underlying_category, group_symbol;