Fixed typo in get_sql_for_work_orders.