I'm not sure that I understand. Do you want the SQL query to actually update the list? If so, that is something that you probably want to stay away from as it is really unsupported. If you are just looking for a some help actually querying the SQL tables for a report or something then it really quite easy.
The actual values of data contained in a list reside in the dbo.UserData table in the 'Site' database. To figure out the list ID of the list that you are trying to get information for, you can either use your browser and go to the properties of the list or you can look in the dbo.Lists table that is also in the 'Site' database.
As for actually updating or inserting values in those tables... I have no idea. If you need to automatically update or insert a value you should really consider creating a .NET application that uses the SharePoint API to make changes to lists.
Just my 2 cents.