Custom report data from child table

Hi,

I want to create a custom report with data retrieved from the child table.

How to get the data? is it with frappe.get_doc?

i try query SQL first
def get_house_mortality(filters):
conditions = get_conditions(filters)

house_mortality = frappe.db.sql("""SELECT DISTINCT
		       house as house,
		       line as house_line,
			side as house_side,
			tier as house_tier,
			section as house_section,
			battery as house_battery,
			amount as house_mortality_amount,
			FROM `tabHouse Hierarchy Table`
			%s
			GROUP BY house
			""" % conditions, as_dict=1)

if not house_mortality:
     frappe.msgprint(msg="No Data Available", title="No Mortality Data Available", raise_exception=True)


return house_mortality

then how to get child table value from document?