Last active
July 10, 2017 07:38
-
-
Save vijayabaskarFD/fe1385806fa1d1de1b4036114d77ae35 to your computer and use it in GitHub Desktop.
Baikal Frequently used Queries
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
SET ACCOUNT_NUMBER = 2; | |
select | |
sam.id as id, | |
sa.title as title, | |
sab.description as desc_html, | |
sab.desc_un_html as description, | |
sfm.id as folder_id, | |
scm.id as category_id, | |
sc.name as category_name, | |
sa.art_type as article_type, | |
sa.thumbs_up as thumbs_up, | |
sa.thumbs_down as thumbs_down, | |
sa.account_id as account_id, | |
sa.hits as hits, | |
sa.status as status | |
from | |
solution_articles sa join solution_article_meta as sam on sa.parent_id=sam.id join | |
solution_article_bodies sab on sa.id = sab.article_id join | |
solution_folder_meta sfm on sam.solution_folder_meta_id=sfm.id join | |
solution_folders sf on sfm.id=sf.parent_id join | |
solution_category_meta scm on sfm.solution_category_meta_id=scm.id join | |
solution_categories sc on scm.id=sc.parent_id | |
where | |
sa.account_id=${hiveconf:ACCOUNT_NUMBER} and | |
sab.account_id=${hiveconf:ACCOUNT_NUMBER} and | |
sam.account_id=${hiveconf:ACCOUNT_NUMBER} and | |
scm.id != 4 and | |
status = 2; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment