Your query can be simplified to: SELECT DISTINCT t1.unique_id AS uid, t1.confidence_is_same ) t2 ON t1.confidence_is_same = t2.max_confīut the join isn't needed in the first place. SELECT max(confidence_is_same) OVER (PARTITION BY root_id) max_conf ) t1 -<< the alias for the derived table is missing WHERE daniel.unique_physician.first_name = ''ĪND daniel.unique_physician.last_name = ''ĪND daniel.unique_physician.is_root_phys = 0ĪND daniel.unique_physician.postal_code = '' SELECT DISTINCT t1.unique_id AS uid, t1.confidence_is_same And the outer pair around the from clause is useless. You need an alias for both derived tables.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |