Check out example codes for "sql query wordpress export post". It will help you in understanding the concepts better.

Code Example 1

SELECT * 
FROM  `wp_posts` 
WHERE  `post_type` =  "post type name here"

Learn ReactJs, React Native from akashmittal.com