Hivemind SQL query tip: Getting posts by multiple tag selection

Get the posts tagged as utopian-io and development and python


SELECT author, 
       permlink 
FROM   hive_posts 
WHERE  id IN (SELECT post_id 
              FROM   hive_post_tags 
              WHERE  tag = 'python' 
              intersect 
              SELECT post_id 
              FROM   hive_post_tags 
              WHERE  tag = 'development' 
              intersect 
              SELECT post_id 
              FROM   hive_post_tags 
              WHERE  tag = 'utopian-io') 
ORDER  BY created_at DESC 
LIMIT  10; 

Result:


   author   |                                               permlink
------------+-------------------------------------------------------------------------------------------------------
 sisygoboom | redfisher-bot--discover-and-support-small-accounts
 espoem     | fpl-updating-tests-and-minor-fixes
 emrebeyler | new-version-on-tower-hivemind-rest
 holger80   | update-for-beem-getblog-getfollowers-and-getfollowing-works-for-api-steemit-com
 imwatsi    | trader-bfx-backend-order-books-settings-module-and-tickers
 sisygoboom | redfisher-v10--support-small-accounts-that-act-in-a-positive-way
 imwatsi    | trading-assistant-bot-bitfinex-api-websocket-connection-channel-subscriptions-and-candle-data-parsing
 emrebeyler | instasteem-a-cli-app-library-to-cross-post-instagram-content-into-your-steem-profile
 pinkwonder | fceux-remote-controlling
 sisygoboom | steem-late-vote-explorer--210

Planning to expose this with the tower API since this is the million dollar question asked several times in SteemDevs discord, before. :)

H2
H3
H4
Upload from PC
Video gallery
3 columns
2 columns
1 column
8 Comments