ok, I was close and I have solution:
SELECT wp_posts.ID, wp_postmeta.meta_value FROM wp_postmeta
INNER JOIN wp_posts ON wp_posts.ID = wp_postmeta.post_id
INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id)
INNER JOIN wp_term_relationships AS tt1 ON (wp_posts.ID = tt1.object_id)
WHERE 1=1
AND wp_postmeta.meta_key = '_application'
AND ( wp_term_relationships.term_taxonomy_id IN (31)
AND
tt1.term_taxonomy_id IN (14)
)
Related Posts:
- Custom Query to search through categories
- How Do I Merge Categories With phpMyAdmin
- Disallow categories from this MySQL query
- How to get related tags based on a category?
- How Do I Delete WordPress Posts Older Than 400 Days, From A WordPress Category
- is_category() in pre_get_posts strange error
- Checklist of selected categories
- Rearranging posts based on categories
- Custom query with category exclusion and post-meta “whitelist”
- How to create 450 categories in wp
- How to query all posts of a specific category, and any other category combination
- is_category in pre_get_posts results in php notices
- Query the Loop without breaking it
- How to Check if a Child Category is Being Queried
- Hide post meta data on a specific category
- Grouping related postmeta data via SQL query
- Category archive page – loop through posts of certain tag (with pagination) – pre_get_posts
- If newest post of category is newest post in general, skip first post of category
- mySQL query. ORDER BY meta_key
- How to show author name only if the post is in a specific category?
- Include posts from feature category in pre_get_posts
- Accessing WordPress MySQL Database via Data Connection in Visual Studio 2010 using C#
- How to display posts under a specific subcategory of a given category
- get_the_category and echo out link to child-most/deepest category
- Change the category of all posts in it
- How to run select query of post with category and tags for API?
- query in category.php repeats itself
- Display posts separated by Category in Author’s page
- How to display singular form of category name?
- Category param redirect to post type archive
- SQL to migrate post types to taxonomy
- Show popular post by category code
- How to get latest posts from each category in regular order
- Drop posts from categories in MySql
- category pagination got broken suddenly
- get_post_meta not working on category.php
- WordPress Post # of # filtered by category slug
- How to query categories with Advanced Custom Fields?
- Hidde certain category from post meta
- Where and when does WordPress invoke routes
- Can Categories be used to hack a Multisite-like setup w/ a single MySql db?
- And/Or Category Query
- Exclude category from query
- Is there a way to only show Custom Meta Data on single posts from certain catagories
- Overriding default calendar to show posts from a category
- How to modify the output of wp_terms_checklist when used within the built-in category metabox on edit posts?
- How to list all categories and their IDs using SQL query?
- function query_posts disabling current_page_menu class
- Get Meta Keys of Custom Categories
- Custom meta boxes ID prefix showing on first category but not others
- Using in ‘category_name’ in ‘$query->set();’?
- custom query for both category and pages using global $wpdb;
- Get categories of queried posts
- Query from multiple category (and)
- How to display posts from specific category using get_option function?
- SQL query to get posts from multiple categories but not in a category
- Conditional category query breaking?
- WordPress: Using the category slug get the category ID using mysql query
- How to add categories using mysql
- How to filter post from categories only if the posts appears in one of them, not the other?
- Category name for all posts getting assigned to a single random post
- Show Posts via cat+cat in URL that are in both Categories doesn’t work
- Sending all categories associated with a post to Google Ad Manager for use with .setTargeting
- List of post categories only associated to another custom taxonomy
- how tho change number of posts in loop from specific categories
- Remove “Category:” from Post meta
- Displaying data from custom fields on a specific category page
- How do I merge WooCommerce categories with the same name?
- Please tell how to stop the category from showing up on posts
- Get category from slug list
- Bulk Change WordPress category Slug
- Issue with WordPress category search
- Querying posts from two different categories while looping inside another loop
- Too many categories drastically slow down my website
- How to get posts from many categories using WP_Query
- Is it possible to query the result of a query?
- show posts found in multiple categories via category_name query string?
- Custom MySQL Query for Post and Post Meta
- Match two taxonomies to display a specific content
- How can I hide the category term for posts with none set?
- Category slug in in loop always the same?
- display certain category on custom template page
- Detecting top parent category fails on home page
- How to use Greek characters/letters in a query?
- Displaying posts by year
- wordpress category.php query for featured news item, broken pagination and repeating posts
- finding out the top 5 source ( source is a custom taxonomy ), in a given category
- How to make that all posts with a category belong also to another
- How to show posts of a specific category
- How to get parent and child sub category (Taxonomy) order to display
- select posts from sql except posts from specific category
- How to query by subcategory and, if there are fewer than 10 posts in that subcategory, fill out with posts from parent category
- How to make query loop block dynamic
- Display posts of certain categories to specific user roles
- related articles using shortcodes
- Adding additional content on post depending on post categories
- How to access deleted term inside delete_product_cat action
- Remove parent category from child/sub-category page URL in WordPress
- How to restrict category creation to admins only while allowing editors to still pick category
- Adding a H1 Tag to Post Tags automatically, but hide the tag? (Same for Category)