Is it possible to add a filter through Visual Query on a table prior to joining tables?
Below is the generated SQL through the Visual Query using the Filter Tab.
SELECT report_month.id AS "Month", quote_header_view.signed_year AS "Signed Year", SUM(quote_header_view.quote_total) AS "sum(Quotation Total)", SUM(quote_header_view.quotation_confirm) AS "sum(Quotation Confirm)", SUM(quote_header_view.confirm_amount) AS "sum(Confirm Amount)", COUNT(quote_header_view.quoteno) AS "count(Quotation Number)" FROM report_month LEFT JOIN quote_header_view ON report_month.id = quote_header_view.signed_month WHERE quote_header_view.team = '2' GROUP BY report_month.id, quote_header_view.signed_year
I want to add the filter to a table before joining together
SELECT report_month.id AS "Month", quote_header_view.signed_year AS "Signed Year", SUM(quote_header_view.quote_total) AS "sum(Quotation Total)", SUM(quote_header_view.quotation_confirm) AS "sum(Quotation Confirm)", SUM(quote_header_view.confirm_amount) AS "sum(Confirm Amount)", COUNT(quote_header_view.quoteno) AS "count(Quotation Number)" FROM report_month LEFT JOIN quote_header_view ON report_month.id = quote_header_view.signed_month and quote_header_view.team = '2' GROUP BY report_month.id, quote_header_view.signed_year