3
I have two tables: pessoas
and carros
.
I would like to take the number of elements of both tables, and multiply them.
3
I have two tables: pessoas
and carros
.
I would like to take the number of elements of both tables, and multiply them.
3
I think this is what you want:
SELECT a.c * b.d AS produto
FROM (SELECT COUNT(*) AS c FROM pessoas) a,
(SELECT COUNT(*) AS d FROM carros) b
2
select
(select count(*) from pessoas) *
(select count(*) from carros)
Browser other questions tagged sql postgresql
You are not signed in. Login or sign up in order to post.