Skip to content
Advertisement

Tag: inner-join

SQL Multiple join from 2 table to 1

I want to join from 2 table to 1. I have tried it multiple times but I can’t figure out the correct code. The name ‘Edvard Supica’ which is the full_name from suser table I want to be on the place of User ID and in 1 record. Answer If you’re joining both machines and susers on workbook, you can

Duplicated inner join results

With postgres I’m trying to get a single user and all their posts, but when I inner join the Users and Posts tables I receive this: QUERY: I’m also trying to do the same thing but as a json QUERY: I know why but I don’t know how to avoid it, can someone help me to get something like this:

Join count query into one

I have two very simple count queries that I would like to join into one. To clarify the situation I will add the tables I got: Book isbn author 1111 GB 2222 DC 3333 RL Author code Name GB George B. KL Kyle L. DC Donald C. RL Roland L. Coauthor name isbn KL 1111 GB 2222 GB 3333 And

REGEX in stored procedure in “=”/like clause

I’ve created a stored procedure with 3 inner joins (please, don’t judge me :D): TableAnotherTable is the association table between Table and AnotherTable. So, this stored procedure works in some cases (if ET.Value is equal to A.Value). But if: the stored procedure must also work. How can I change the last ON of the inner join clause (with “=”) to

How to define INNER JOIN in SQL

I have a problem how to define INNER JOIN in SQL. The problem is that I have a table Names with columns ID and Name. The other table has column PersonID. Sometimes value in column PersonID is 0, and in Names table there is no row with a column value of 0. I have created a view, and I am

INNER JOIN twice form the same table

I have 2 database tables that I want to JOIN. DB table 1 had football fixtures in it. So Team A plays Team B and the score was. The data comes from an API and in this DB table the teams are numbers instead of actual names. In the second DB table I have a list of all the teams

Advertisement