Filter users likes out if account created x days prior to topic creation

There are a few snags with that one, though I’m not swish enough with SQL to be able to explain them fully. :slightly_smiling_face:

I think you wouldn’t need the topic_id if you already have the post_id, as the post id is unique to that post (and topic). You also seem to be trying to join the some of the extra tables on fields that are not in the second table (eg, = is exactly the same field within the topics table). And if the topic you’re querying against is static then you wouldn’t need a relative INTERVAL as it will always be the same date (ie. 2 days prior to post 15000 being created), so you could set that as an explicit date.

I haven’t had chance to try my own version as yet, but I learnt most of my SQL/badge skills from searching Meta for different examples and magpie-ing bits and pieces of those. :slight_smile: A lot of them are under the #data-explorer tag, and there’s a host of examples for different things in Some common badge queries idea which may be worth a browse?