This is not what interfaces were intended for. You probably should read up on interfaces to learn more about how to use them.
If you have a need to use SQL queries, I would create a helper class and have some properties like QUERY1 that don't change and then some methods for QUERY2 where the method takes parameters that you use to build the query and return it.
I would also suggest that you give the queries descriptive names. No one is going to know what QUERY1 v QUERY2 is. Names like TopTenBugs, MostPurchasedProduct, etc. would be more easily identified.
Some sample code
public static class Queries
{
public static String TopProduct = "SELECT TOP 1 ProductId FROM Products";
public static PreparedStatement getTopNOfField(Connection connection, int number, String fieldName)
{
PreparedStatement statement = connection.prepareStatement("SELECT TOP ? ? FROM Products");
statement.setInt(1, number);
statement.setString(2, fieldName);
return statement;
}
}
I'm not an SQL expert but this should give you a sense of what I'm talking about. I went with PreparedStatement since that's a best practice for avoiding SQL injection. There are also a lot of libraries created to help build SQL queries that you could use.
You might want to change this to where everything is a PreparedStatement for consistency. So, change the static Strings to methods with no parameters. That way your user experience is the same no matter which query you use.
You could also change this helper class to handle all the SQL business... connections, queries, etc. and return the results rather than PreparedStatements. It's up to you.