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 need to recreate this sql statement with the builder, but really struggling with creating a group of subwhere statements.
WHERE website_listing_priority IS NOT NULL
AND (
(
duration_magnitude <= 90 AND
duration_unit = 'Days'
) OR (
duration_magnitude <= 12 AND
duration_unit = 'Weeks'
) OR (
duration_magnitude <= 3 AND
duration_unit = 'Months'
) OR (
duration_magnitude = 0 AND duration_unit = 'Years'
)
)
Is there any way to handle this? Initially I thought I could do something like this
i faced a similar problem... subwheres are not helpful in complex queries, which anyone will have to encounter at some point.
In SQL it's easy to just add a parenthesis, the equivalent here would have been to have a method like beginGroup() and endGroup()
I need to recreate this sql statement with the builder, but really struggling with creating a group of subwhere statements.
Is there any way to handle this? Initially I thought I could do something like this
but this simply nests the subwhere's within each other e.g.
And (
Or (
Or (
Or (
)
)
)
)
How would I nest each of the subwhere's within the first Where statement?
The text was updated successfully, but these errors were encountered: