Answer the question
In order to leave comments, you need to log in
SQL query optimization. Select data from different tables?
Welcome all. I can not understand in what ways it is possible to make a request differently.
I have a query like this:
SELECT
sum(state = 1) as yes,
sum(state = 0) as no
FROM pay_partners WHERE autor_signal = :autor
UNION SELECT
sum(buy_follow),
sum(money_buy_sub)
FROM partners_all WHERE autor = :autor
UNION SELECT avg(count_symbols), avg(count_symbols) FROM article WHERE autor = :autor
UNION SELECT rating, rating FROM users WHERE login = :autor
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question