Last active
July 9, 2016 17:57
-
-
Save vigikaran/6b1a15d55976d92877bbec1d67f468f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (SELECT `source`.`hindi_news_sys_id` AS `news_sys_id`, | |
| `source`.`hindi_news_sys_ownerid` AS `news_sys_ownerid` | |
| , | |
| `source`.`hindi_news_title` AS | |
| `news_title`, | |
| `source`.`hindi_news_labelid` AS `news_labelid`, | |
| Unix_timestamp(source.hindi_news_publish_datetime) AS | |
| news_publish_datetime, | |
| Unix_timestamp(source.hindi_news_sys_created) AS news_sys_created, | |
| `source`.`hindi_news_authorid` AS `news_authorid`, | |
| `source`.`hindi_news_sys_publishids` AS | |
| `news_sys_publishids`, | |
| `source`.`hindi_news_thumb_url` AS `news_thumb_url`, | |
| `source`.`hindi_news_sys_hits` AS `news_sys_hits`, | |
| `authors`.`users_alias` AS `news_owner_name`, | |
| `category`.`categories_name_en`, | |
| `news_linked`.`hindi_news_linked_field`, | |
| `primarycate`.`categories_name_en` AS | |
| `primary_category_name_en`, | |
| `lables`.`content_labels_name`, | |
| "hindi" AS source, | |
| "100004" AS target_id | |
| FROM `hindi_news` AS `source` | |
| LEFT JOIN `hindi_news_linked_ids` AS `news_linked` | |
| ON `source`.`hindi_news_sys_id` = | |
| `news_linked`.`hindi_news_linked_id` | |
| AND `news_linked`.`hindi_news_linked_field` = 'categories' | |
| LEFT JOIN `zpanel_common`.`categories` AS `category` | |
| ON `category`.`categories_sys_id` = | |
| `news_linked`.`hindi_news_linked_value` | |
| AND `category`.`categories_sys_stateid` = '1' | |
| LEFT JOIN `zpanel_common`.`categories` AS `primarycate` | |
| ON `primarycate`.`categories_sys_id` = | |
| `source`.`hindi_news_primary_categoryid` | |
| AND `primarycate`.`categories_sys_stateid` = '1' | |
| LEFT JOIN `zpanel_common`.`content_labels` AS `lables` | |
| ON `lables`.`content_labels_sys_id` = | |
| `source`.`hindi_news_labelid` | |
| AND `lables`.`content_labels_sys_stateid` = '1' | |
| LEFT JOIN `zpanel`.`users` AS `authors` | |
| ON `authors`.`users_sys_id` = `source`.`hindi_news_sys_ownerid` | |
| GROUP BY `source`.`hindi_news_sys_id` | |
| ORDER BY `hindi_news`.`hindi_news_sys_created` DESC) | |
| UNION ALL | |
| (SELECT `source`.`english_news_sys_id` AS `news_sys_id`, | |
| `source`.`english_news_sys_ownerid` AS | |
| `news_sys_ownerid`, | |
| `source`.`english_news_title` AS `news_title`, | |
| `source`.`english_news_labelid` AS `news_labelid`, | |
| Unix_timestamp(source.english_news_publish_datetime) AS | |
| news_publish_datetime, | |
| Unix_timestamp(source.english_news_sys_created) AS news_sys_created | |
| , | |
| `source`.`english_news_authorid` AS | |
| `news_authorid`, | |
| `source`.`english_news_sys_publishids` AS | |
| `news_sys_publishids`, | |
| `source`.`english_news_thumb_url` AS `news_thumb_url` | |
| , | |
| `source`.`english_news_sys_hits` AS | |
| `news_sys_hits`, | |
| `authors`.`users_alias` AS | |
| `news_owner_name`, | |
| `category`.`categories_name_en`, | |
| `news_linked`.`english_news_linked_field`, | |
| `primarycate`.`categories_name_en` AS | |
| `primary_category_name_en`, | |
| `lables`.`content_labels_name`, | |
| "english" AS source, | |
| "100016" AS target_id | |
| FROM `english_news` AS `source` | |
| LEFT JOIN `english_news_linked_ids` AS `news_linked` | |
| ON `source`.`english_news_sys_id` = | |
| `news_linked`.`english_news_linked_id` | |
| AND `news_linked`.`english_news_linked_field` = 'categories' | |
| LEFT JOIN `zpanel_common`.`categories` AS `category` | |
| ON `category`.`categories_sys_id` = | |
| `news_linked`.`english_news_linked_value` | |
| AND `category`.`categories_sys_stateid` = '1' | |
| LEFT JOIN `zpanel_common`.`categories` AS `primarycate` | |
| ON `primarycate`.`categories_sys_id` = | |
| `source`.`english_news_primary_categoryid` | |
| AND `primarycate`.`categories_sys_stateid` = '1' | |
| LEFT JOIN `zpanel_common`.`content_labels` AS `lables` | |
| ON `lables`.`content_labels_sys_id` = | |
| `source`.`english_news_labelid` | |
| AND `lables`.`content_labels_sys_stateid` = '1' | |
| LEFT JOIN `zpanel`.`users` AS `authors` | |
| ON `authors`.`users_sys_id` = `source`.`english_news_sys_ownerid` | |
| GROUP BY `source`.`english_news_sys_id` | |
| ORDER BY `english_news`.`english_news_sys_created` DESC) | |
| UNION ALL | |
| (SELECT `source`.`cloud_news_sys_id` AS `news_sys_id`, | |
| `source`.`cloud_news_sys_ownerid` AS `news_sys_ownerid` | |
| , | |
| `source`.`cloud_news_title` AS | |
| `news_title`, | |
| `source`.`cloud_news_labelid` AS `news_labelid`, | |
| Unix_timestamp(source.cloud_news_publish_datetime) AS | |
| news_publish_datetime, | |
| Unix_timestamp(source.cloud_news_sys_created) AS news_sys_created, | |
| `source`.`cloud_news_authorid` AS `news_authorid`, | |
| `source`.`cloud_news_sys_publishids` AS | |
| `news_sys_publishids`, | |
| `source`.`cloud_news_thumb_url` AS `news_thumb_url`, | |
| `source`.`cloud_news_sys_hits` AS `news_sys_hits`, | |
| `authors`.`users_alias` AS `news_owner_name`, | |
| `category`.`categories_name_en`, | |
| `news_linked`.`cloud_news_linked_field`, | |
| `primarycate`.`categories_name_en` AS | |
| `primary_category_name_en`, | |
| `lables`.`content_labels_name`, | |
| "cloud" AS source, | |
| "100006" AS target_id | |
| FROM `cloud_news` AS `source` | |
| LEFT JOIN `cloud_news_linked_ids` AS `news_linked` | |
| ON `source`.`cloud_news_sys_id` = | |
| `news_linked`.`cloud_news_linked_id` | |
| AND `news_linked`.`cloud_news_linked_field` = 'categories' | |
| LEFT JOIN `zpanel_common`.`categories` AS `category` | |
| ON `category`.`categories_sys_id` = | |
| `news_linked`.`cloud_news_linked_value` | |
| AND `category`.`categories_sys_stateid` = '1' | |
| LEFT JOIN `zpanel_common`.`categories` AS `primarycate` | |
| ON `primarycate`.`categories_sys_id` = | |
| `source`.`cloud_news_primary_categoryid` | |
| AND `primarycate`.`categories_sys_stateid` = '1' | |
| LEFT JOIN `zpanel_common`.`content_labels` AS `lables` | |
| ON `lables`.`content_labels_sys_id` = | |
| `source`.`cloud_news_labelid` | |
| AND `lables`.`content_labels_sys_stateid` = '1' | |
| LEFT JOIN `zpanel`.`users` AS `authors` | |
| ON `authors`.`users_sys_id` = `source`.`cloud_news_sys_ownerid` | |
| GROUP BY `source`.`cloud_news_sys_id` | |
| ORDER BY `cloud_news`.`cloud_news_sys_created` DESC) | |
| UNION ALL | |
| (SELECT `source`.`malayalam_news_sys_id` AS `news_sys_id`, | |
| `source`.`malayalam_news_sys_ownerid` AS | |
| `news_sys_ownerid`, | |
| `source`.`malayalam_news_title` AS `news_title`, | |
| `source`.`malayalam_news_labelid` AS `news_labelid`, | |
| Unix_timestamp(source.malayalam_news_publish_datetime) AS | |
| news_publish_datetime, | |
| Unix_timestamp(source.malayalam_news_sys_created) AS | |
| news_sys_created, | |
| `source`.`malayalam_news_authorid` AS `news_authorid` | |
| , | |
| `source`.`malayalam_news_sys_publishids` AS | |
| `news_sys_publishids`, | |
| `source`.`malayalam_news_thumb_url` AS | |
| `news_thumb_url`, | |
| `source`.`malayalam_news_sys_hits` AS `news_sys_hits` | |
| , | |
| `authors`.`users_alias` AS | |
| `news_owner_name`, | |
| `category`.`categories_name_en`, | |
| `news_linked`.`malayalam_news_linked_field`, | |
| `primarycate`.`categories_name_en` AS | |
| `primary_category_name_en`, | |
| `lables`.`content_labels_name`, | |
| "malayalam" AS source, | |
| "100012" AS target_id | |
| FROM `malayalam_news` AS `source` | |
| LEFT JOIN `malayalam_news_linked_ids` AS `news_linked` | |
| ON `source`.`malayalam_news_sys_id` = | |
| `news_linked`.`malayalam_news_linked_id` | |
| AND `news_linked`.`malayalam_news_linked_field` = 'categories' | |
| LEFT JOIN `zpanel_common`.`categories` AS `category` | |
| ON `category`.`categories_sys_id` = | |
| `news_linked`.`malayalam_news_linked_value` | |
| AND `category`.`categories_sys_stateid` = '1' | |
| LEFT JOIN `zpanel_common`.`categories` AS `primarycate` | |
| ON `primarycate`.`categories_sys_id` = | |
| `source`.`malayalam_news_primary_categoryid` | |
| AND `primarycate`.`categories_sys_stateid` = '1' | |
| LEFT JOIN `zpanel_common`.`content_labels` AS `lables` | |
| ON `lables`.`content_labels_sys_id` = | |
| `source`.`malayalam_news_labelid` | |
| AND `lables`.`content_labels_sys_stateid` = '1' | |
| LEFT JOIN `zpanel`.`users` AS `authors` | |
| ON `authors`.`users_sys_id` = | |
| `source`.`malayalam_news_sys_ownerid` | |
| GROUP BY `source`.`malayalam_news_sys_id` | |
| ORDER BY `malayalam_news`.`malayalam_news_sys_created` DESC) | |
| ORDER BY `news_sys_created` DESC | |
| LIMIT | |
| 5 offset 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment