Hi @justyy sorry for commenting off topic here but I found some of your SteemSQL tutorials and they have been extremely helpful to me as a beginner with SQL trying to query steemsql db. If you have the time to help me I would really love some help writing a specific sql query.
So what I am trying to accomplish is - query that returns URL of all new posts (posts only, not comments) that meet these requirements: post age between 1 and 24 hours old; post not flagged; post author reputation between 27 and 52; current pending post payout less than $1; post word count more than 500 (this may have to be specified in characters if I am reading the DB right, in which case post character count more than 3000). Here is what I have so far:
SELECT
url,
sum(pending_payout_value) as pending_payout_value
FROM
Comments (NOLOCK)
WHERE
dirty = 'False' and
parent_author = '' and
datediff(hour, created, GETDATE()) between 1 and 24 and
pending_payout_value < 1 and
body_length >=3000 and
author_reputation between 27 and 52
group by
url
order by
pending_payout_value asc
I am obviously doing something wrong, as the query returns 0 results - my problem may be with the author rep and body length arguments. I have asked for help on the steemchat steemsql help channel but no reply - I am not entirely sure comments/body_length is the post length in characters but I believe so...
A million thanks in advance! I am @carlgnash on steemit.chat and @gnashster on Discord chat if you want to respond in DM there rather than answer in the comments here. Thank you so much for your awesome tutorials! Cheers - Carl