Hello,
excuse the (probably) newbie question.
I must discover the "duplicates" in a list of books (where "duplicates" means books of same title and same location).
I've created the following query based on the items table of the database:
SELECT [bookId] ,[locationId] , COUNT(*) FROM [database].[dbo].[items] GROUP BY [bookId], [locationId]HAVING COUNT(*) > 1
it works well, but the info about the books is completed by other 2 tables:
1) [database].[dbo].[books]
that has [Id] = [database].[dbo].[items].[bookId]
2) [database].[dbo].[locations]
that has [Id] = [database].[dbo].[items].[locationId]
these tables contains other useful info that I want to include in my previous query, like:
[database].[dbo].[books].[title]
[database].[dbo].[locations].[location_name]
is it possible doing so?
Thanks a lot,
Fabiano
Thanks a lot for your help!
I've marked both as solutions.
Take Care,
Fabiano