You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to compare results of two subqueries in where clause in SQLKata.
In SQL it should be like this:
WHERE (SELECT count(id) FROM main.someTable) = (SELECT count(id) FROM main.anotherTable)
In SQLKata I can compare result of subquery with scalar value:
var mainSubquery = new Query("main.someTable")
.SelectRaw("count(id)");
var anotherSubquery = new Query("main.anotherTable")
.SelectRaw("count(id)");
query
.WhereSub(mainSubquery, "=", 0)
But I can't compare results of two subqueries this way:
I try to compare results of two subqueries in where clause in SQLKata.
In SQL it should be like this:
In SQLKata I can compare result of subquery with scalar value:
But I can't compare results of two subqueries this way:
How can I fix it? Maybe I should execute both of the subqueries and only then compare their results?
Thanks for response in advance.
The text was updated successfully, but these errors were encountered: