def definition():
    """Verbose view of cost object, for UI"""
    sql = """
SELECT 
    -- Cost fields 
    c.cost_id, c.component_id, c.room_type_id, c.cost_type_id, 
    c.description, c.max_group_size, ISNULL(c.notes, ' ') as notes, c.number_of_staff, 
    c.tt_type_id, c.unit_cost, c.tt_notes,
    -- Other fields 
    ct.cost_type_id as cost_type_description, ct.is_taught, ctp.is_pay, 
    ctp.description as is_pay_description, comp.description as component_description, 
    t.description as tt_type_description,
    comp.calendar_type
FROM c_cost c 
INNER JOIN sp_room_type rt ON rt.room_type_id = c.room_type_id
INNER JOIN c_cost_type ct ON ct.cost_type_id = c.cost_type_id 
INNER JOIN c_cost_type_pay ctp ON ctp.is_pay = ct.is_pay
INNER JOIN c_component comp ON comp.component_id = c.component_id 
INNER JOIN tt_type t ON t.tt_type_id = c.tt_type_id
    """
    return sql
