why the data not appearing in the table ( qty field),i just see the total qty , you can see picture to take an idea
res = frappe.db.sql(f"""SELECT
i.item_code,
sii.qty as qty,
b.actual_qty
FROM (
select
item_code
from `tabItem`
group by item_code
) i
left join (
select
item_code,
sum(actual_qty) as actual_qty
from `tabBin`
group by item_code
) b on b.item_code = i.item_code
left join (
select
item_code,
sum(qty) as qty
from `tabSales Invoice Item`
group by item_code
) sii on sii.item_code = i.item_code
GROUP BY
sii.item_code,b.item_code
""", as_dict=True,debug=True)
result = res