I want to get child table field into parent table with query

Hello everyone, I want to get child table field name is item_group into parent table.
Parent table name is: Stock Entry
Child table name is: Stock entry details.
Can you please write a query for that.

share what you have done so far

tabStock Entry.name, tabStock Entry.stock_entry_type, tabStock Entry.total_amount,
tabStock Entry.posting_date, tabStock Entry.company, tabStock Entry Detail.item_group
tabStock Entry
tabStock Entry Detail ON tabStock Entry Detail.against_stock_entry = tabStock Entry.name

p.name, p.stock_entry_type, p.total_amount,p.posting_date, p.company, q.item_group
tabStock Entry p
tabStock Entry Detail q ON q.against_stock_entry = p.name


(Select item_group from tabStock Entry Detail where against_stock_entry=p.name) tabStock
tabStock Entry p

MAT-STE-2021-00001 Material Issue 0.000000 2021-08-19 Samsung EVC
MAT-STE-2021-00002 Material Receipt 10000000.000000 2021-08-19 Samsung EVC
MAT-STE-2021-00003 Material Receipt 50000000.000000 2021-08-19 Samsung EVC
MAT-STE-2021-00004 Material Receipt 156000000.000000 2021-08-19 Samsung EVC
MAT-STE-2021-00005 Material Receipt 18750000.000000 2021-08-26 Samsung EVC
MAT-STE-2021-00006 Material Receipt 11111100.000000 2021-08-26 Samsung EVC
MAT-STE-2021-00007 Material Receipt 22500000.000000 2021-08-26 Samsung EVC
MAT-STE-2021-00008 Material Receipt 45000270.000000 2021-08-26 Samsung EVC
MAT-STE-2021-00009 Material Receipt 50000000.000000 2021-08-26 Samsung EVC
MAT-STE-2021-00010 Material Receipt 12500000.000000 2021-08-26 Samsung EVC
MAT-STE-2021-00011 Material Receipt 9999990.000000 2021-08-26 Samsung EVC
MAT-STE-2021-00012 Material Receipt 30000000.000000 2021-08-26 Samsung EVC

I didn’t know the business completely, so I looked at the Query and implemented it.
In my opinion, it is possible to process it using Client Script in DocType.

[Child Table Sample]
qty(frm, cdt, cdn) {
let row = frappe.get_doc(cdt, cdn);
var amount = row.qty * row.price;
frappe.model.set_value(cdt, cdn, “amount”, amount);

[Other Table Sample]
frappe.db.get_value(“Agency”, {“name”: agency_info}, “*”)
.then((data) => {
frm.set_value(‘agency_company03’, data.message.agency_company);
frm.set_value(‘agency_owner03’, data.message.agency_owner);
frm.set_value(‘agency_phone03’, data.message.agency_phone);