title: Distinct content that come from different conditions using Infinite Scroll
body: <p>I am using Postgres v9.5, sequelize 3.30.4 and Koa.js 2.3.0; the situation that I am going through is similar to instagram home feed, where the posts come from users that you are following and also hashtags that you are also following. </p>
  
  <p>I can get all the content in one query using an OR condition, example: </p>
  
  <pre><code>SELECT DISNTICNT(ID), title, description 
  FROM posts 
  WHERE creatorID in (1,2,3...) OR hashtags IN ('{sport}','{technology}'...) 
  ORDER BY "createdAt" DESC 
  LIMIT 10, OFFSET 0;
  </code></pre>
  
  <p>But obviously, from this query I don't have a clue if the post was from the creatorID which in this case is the ID of a user that I am following, or from the hashtags that I am following. I was thinking if there is a way to add a variable or custom column to the query that can identify the source, otherwise I have to make two queries and calculate the limit and the offset which is not what I want to do, or maybe sequelize has some option to join this queries into one and add a column for distinction.</p>