Some useful custom mysql query for get data form wordpress tables

Get post title, custom meta value and assigned category name using mysql query? SELECT wp_posts.ID, wp_posts.post_title, wp_terms.name as category, myvideo.meta_value AS video_id, coutryval.meta_value AS country FROM wp_posts LEFT JOIN wp_postmeta as coutryval ON wp_posts.ID = coutryval.post_id LEFT JOIN wp_postmeta as myvideo ON wp_posts.ID = myvideo.post_id LEFT JOIN wp_term_relationships ON(wp_posts.ID = wp_term_relationships.object_id) LEFT JOIN wp_term_taxonomy ON(wp_term_relationships.term_taxonomy_id …