Query Report Filter


I am new to ERPNext reports. I want to generate a custom report in ERPNext using Query Report. I was able to write a script for the columns in report. However I would like to add filter to columns. How can I do the same?

    so.name AS "Sales Order",
    so.transaction_date AS "Transaction Date",
    so.customer AS "Customer",
    soi.item_code AS "Item Code",
    soi.item_name AS "Item Name",
    soi.qty AS "Quantity",
    soi.delivered_qty AS "Delivered Quantity",
    soi.qty - soi.delivered_qty AS "Pending Quantity"
    `tabSales Order` AS so
    INNER JOIN `tabSales Order Item` AS soi ON so.name = soi.parent
    so.docstatus = 1 
    AND soi.qty > soi.delivered_qty

Hi @smitz96,

More details for, please check it whole post.

Thank You!

Hope this will help