Sort result by taxonomy term weight $query = db_select('node', 'n');
   $query-&gt;join('field_data_taxonomy_catalog', 'tc', 'n.nid = tc.entity_id');
   $query-&gt;leftjoin('field_data_field_chip', 'fdc', 'n.nid = fdc.entity_id');


   $query-&gt;fields('tc',array('taxonomy_catalog_tid'));
   $query-&gt;fields('fdc',array('field_chip_tid'));   

   $query-&gt;fields('n',array('nid'));

   $query-&gt;condition('tc.taxonomy_catalog_tid',$get_tid,'=');


   $query-&gt;orderby("fdc.field_chip_tid","ASC"); //I Want to sort the resultset on the basis of weight instead of the term Id. 


   $result = $query-&gt;execute()-&gt;fetchAll()


I need to sort the result on field_data_field_chip weight instead of the term Id. I am new to Drupal and don't know how to fetch the weight of the taxonomy terms.
The weight column in the taxonomy_term_data table contains the information you need.

You can join it in to your current query via taxonomy_term_data.tid.