I don’t understand why in the specified request only one record is returned from the view?
Given that the same code of this view returns two records with the same condition.
I strongly suspect that this is somehow related to the order of group by and where when using the view. I already had some similar problems here and here .
Structure:
articles(id, name)authors(id, name)jobs(id, name)authors_connection(article_id, author_id, job_id)
links respectively article_id to the article table id author_id , author_id to authors.id , job_id to jobs.id
One article may have several authors. One author may have several places of work, but at the exit of the view there should be only one any. The view merges these separate tables into one authors table with one specified place of work.
group byto remove duplicates ... And what do you suggest?distinct? - PECHAPTER