I have a table called 'Articles' in that table I have 2 columns that will be essential in creating the query I want to create. The first column is the
WHERE DATEDIFF(day, dateStamp, getdate()) BETWEEN 0 and 30
ORDER BY Counter DESC
The MySQL version of the query would look like this:
SELECT a.* FROM Articles a WHERE a.dateStamp >= CURDATE() - interval 30 day ORDER BY a.counter DESC LIMIT 10;
Your query is generating an error. You should look at that error before fixing the query.
The query would look different in SQL Server.