for eg in case of the displaying number of nodes for a term of blog type node some of query clause or fuctions are to be used are count() and group by
select count(node.nid) as nid, term_data.name as term_data_name, term_data.vid as term_data_vid, term_data.tid as term_data_tid from node node left join term_node term_node on node.vid = term_node.vid left join term_data term_data on term_node.tid =term_data.tid where (node.status <> 0) and (node.type in ('blog')) group by term_data_name;
