Skip to content
Advertisement

select count with another select and inner join

Is it possible to use two “select” in the same query?

I tried it but got the syntax error several times.

My query example:

I would like the result shown to be all queries on the screen.

Basically, what I want is that the result shown when executing the query is the first and second “select” together. I really don’t know how or don’t understand how to do this.

Example:

first result with seconde result

I want to show both results at once.

The documents is fake, not real. Only for demo.

Advertisement

Answer

You should be able to do by having the second query as its own JOIN query. Since there is no group by, it is only returning a single row. By no join condition, the value will be available for every row otherwise. So you SHOULD be able to get by doing

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement