Skip to content

Tag: sql

How can I join 4 tables

Please help to modify the below code. I want to join these two select queries such that I can get a single output with records from two diff tables ? I have 4 tables, table_a has the user id that I have to use to search table_b1 has the foreign key for table_c which has the name that I want

Query with Group and name sorting

I am trying to build a SQL query that is bit more complicated to what I am used to writing. Example data: So far I have a working query Currently it will return But I would like that query to always returns the names with biggest event_id, so good results would be “[Lpr] abc” and “[Lpr] Name…