(SELECT ID, post_date, 1 as `blog_id` FROM cisl_posts,cisl_terms,cisl_term_taxonomy, cisl_term_relationships WHERE post_status = 'publish' AND post_type = 'post'
AND cisl_terms.slug ='territorio'
AND cisl_term_relationships.term_taxonomy_id=cisl_terms.term_id
AND cisl_term_taxonomy.term_id=cisl_term_relationships.term_taxonomy_id
AND cisl_term_taxonomy.taxonomy='category'
AND cisl_posts.ID=cisl_term_relationships.object_id ) UNION (SELECT ID, post_date, 2 as `blog_id` FROM cisl_2_posts , cisl_2_postmeta,cisl_2_terms, cisl_2_term_relationships
WHERE cisl_2_posts.ID = cisl_2_postmeta.post_id
AND cisl_2_postmeta.meta_key = 'attiva_nel_network'
AND cisl_2_postmeta.meta_value = '1'
AND cisl_2_posts.post_status = 'publish'
AND cisl_2_terms.slug ='territorio'
AND cisl_2_term_relationships.term_taxonomy_id=cisl_2_terms.term_id
AND cisl_2_posts.ID=cisl_2_term_relationships.object_id
AND cisl_2_posts.post_type = 'post') UNION (SELECT ID, post_date, 3 as `blog_id` FROM cisl_3_posts , cisl_3_postmeta,cisl_3_terms, cisl_3_term_relationships
WHERE cisl_3_posts.ID = cisl_3_postmeta.post_id
AND cisl_3_postmeta.meta_key = 'attiva_nel_network'
AND cisl_3_postmeta.meta_value = '1'
AND cisl_3_posts.post_status = 'publish'
AND cisl_3_terms.slug ='territorio'
AND cisl_3_term_relationships.term_taxonomy_id=cisl_3_terms.term_id
AND cisl_3_posts.ID=cisl_3_term_relationships.object_id
AND cisl_3_posts.post_type = 'post') UNION (SELECT ID, post_date, 4 as `blog_id` FROM cisl_4_posts , cisl_4_postmeta,cisl_4_terms, cisl_4_term_relationships
WHERE cisl_4_posts.ID = cisl_4_postmeta.post_id
AND cisl_4_postmeta.meta_key = 'attiva_nel_network'
AND cisl_4_postmeta.meta_value = '1'
AND cisl_4_posts.post_status = 'publish'
AND cisl_4_terms.slug ='territorio'
AND cisl_4_term_relationships.term_taxonomy_id=cisl_4_terms.term_id
AND cisl_4_posts.ID=cisl_4_term_relationships.object_id
AND cisl_4_posts.post_type = 'post') UNION (SELECT ID, post_date, 5 as `blog_id` FROM cisl_5_posts , cisl_5_postmeta,cisl_5_terms, cisl_5_term_relationships
WHERE cisl_5_posts.ID = cisl_5_postmeta.post_id
AND cisl_5_postmeta.meta_key = 'attiva_nel_network'
AND cisl_5_postmeta.meta_value = '1'
AND cisl_5_posts.post_status = 'publish'
AND cisl_5_terms.slug ='territorio'
AND cisl_5_term_relationships.term_taxonomy_id=cisl_5_terms.term_id
AND cisl_5_posts.ID=cisl_5_term_relationships.object_id
AND cisl_5_posts.post_type = 'post') UNION (SELECT ID, post_date, 6 as `blog_id` FROM cisl_6_posts , cisl_6_postmeta,cisl_6_terms, cisl_6_term_relationships
WHERE cisl_6_posts.ID = cisl_6_postmeta.post_id
AND cisl_6_postmeta.meta_key = 'attiva_nel_network'
AND cisl_6_postmeta.meta_value = '1'
AND cisl_6_posts.post_status = 'publish'
AND cisl_6_terms.slug ='territorio'
AND cisl_6_term_relationships.term_taxonomy_id=cisl_6_terms.term_id
AND cisl_6_posts.ID=cisl_6_term_relationships.object_id
AND cisl_6_posts.post_type = 'post') ORDER BY post_date DESC LIMIT 544,8;