SQL – Pull products of particular category from a remote WordPress woocommerce db

I check your query and it’s working fine without any errors or empty results. But in addition if you remove INNER JOIN from wp_terms table its also working because you are not getting anything from that table and it is not used in WHERE clause also.

SELECT ID, `post_date` ,  `post_title` ,  `post_content` ,  `guid` FROM  `wp_posts` as post

INNER JOIN wp_term_relationships rs ON rs.object_id = post.ID 

WHERE  `post_type` =  "post" //post type post for my example
AND  `post_status` =  "publish"
AND rs.term_taxonomy_id  = 1 //term_taxanomy_id is 1 for my example

ORDER BY post_date DESC LIMIT 5