I have three tables
message
id | statement | date
the functions
id | feature
post_feature (much for the table between Post and Feature)
post_id | feature_id
I want to run a query that will give me the number of different functions and corresponding functions for messages that are in a given period. I just started learning SQL, and I can't hack this one.
I tried the following but did not get the correct results.
SELECT f.feature, count(f.feature) FROM post_feature l JOIN features f ON (l.featureid = f.id AND l.featureid IN ( select post.id from post where post.date > 'some_date')) GROUP BY f.feature
rishi source share