What is the difference between sql-query and db-api?
Are there any cases where a question is about a SQL query, but it is not about the database API?
Should both the tags be kept, or should db-api replace the other?
3 Answers
Looking at the questions for sql-query, the first clearly should be db-api, the second is a views question which is at least not db-api (not sure if it is sql-query) and the second clearly is a generic SQL question (although somewhat drupal specific), how the db api works doesn't really matter there.
So my suggestion would be to move the first question over to db-api but leave it on the other two.
In my opinion it is two different tags.
Example, if I am asking how to get taxonomy terms with node count by sql I tag question as sql-query. But if I shall ask how build pager query it will be db-api tag.
I agree with Xio; sql-query should be about "which query is needed to get my data from the db", while db-api is about "how do I build that query using the Drupal db layer", including all the fun stuff like hook_query_alter.
That said, one could argue that all sql-query questions are not Drupal-specific and should be asked on Stack Overflow.