MayHyeyeonKim / bookdo7stars-be-js

Manual backup repository for BookDo7starsTS/bookdo7stars_be
0 stars 0 forks source link

Search query types in the `book_query_types` table using SQL #9

Open MayHyeyeonKim opened 1 month ago

MayHyeyeonKim commented 1 month ago
SELECT * FROM public.book_query_types
WHERE query_type = 'ItemNewAll'
ORDER BY book_id ASC, query_type ASC;

SELECT * 
FROM public.book_query_types
WHERE query_type = 'ItemNewSpecial'
ORDER BY book_id ASC, query_type ASC;

SELECT * 
FROM public.book_query_types
WHERE query_type = 'Bestseller'
ORDER BY book_id ASC, query_type ASC;

SELECT * 
FROM public.book_query_types
WHERE query_type = 'BlogBest'
ORDER BY book_id ASC, query_type ASC;

SELECT * 
FROM public.book_query_types
WHERE query_type = 'ItemEditorChoice'
ORDER BY book_id ASC, query_type ASC;
MayHyeyeonKim commented 1 month ago

Retrieve the distinct query types available in the book_query_types table

SELECT DISTINCT query_type 
FROM public.book_query_types
ORDER BY query_type ASC;