publish_data=frappe.db.sql('''select name,CAST(version AS DECIMAL(10,2)) as version from {}.tabPublish where vehicle= '{}' and language='{}' and publish_type = '{}' and version > {} and vehicle_status = 'Active';
publish_data=frappe.db.sql('''select name,CAST(version AS DECIMAL(10,2)) as version from {}.tabPublish where vehicle= '{}'
publish_data=frappe.db.sql('''select name,version,release_description as description from {}.tabPublish where vehicle= '{}' and language='{}' and publish_type= '{}' and version > {} and vehicle_status = 'Active'; '''.format(current_db_name,vehicle,l_id,publish_type,current_version),as_dict=True)
publish_data=frappe.db.sql('''select name,version,release_description as description from {}.tabPublish where vehicle= '{}'
'''SELECT category, attach_file as file, %s,idx as variant_asset_idx FROM %s.`tabVariant Mapping_Assets` where category<>'Technical Manual'and parent='%s' and language='%s';'''%(
'''SELECT idx as systemdisplayorder, system_asset FROM {3}.`tabSystem Mapping_System Assets` where parent like '{0}%' and language='{1}'and systems='{2}';'''.format(
d,l_id,i,current_db_name),as_dict=True)
'''SELECT idx as systemdisplayorder, system_asset FROM {3}.`tabSystem Mapping_System Assets` where parent like '{0}%' and language='{1}'
andsystems='{2}';'''.format(d, l_id, i, current_db_name), as_dict=True)
'''SELECT kilometer as kilometer_name, idx as kilometer_IDX, applicable as kilometers_applicable FROM {}.`tabKilometer Mapping_Items` where sub_systems='{}'
proc_details=frappe.db.sql('''select procedure_name, step_name, content_type, GROUP_CONCAT(content) as content, GROUP_CONCAT(file) as file,GROUP_CONCAT(DISTINCT idx order by idx) as display_order, idx from {}.tabProcedure_Details