Skip to content
Advertisement

Tag: sql

SQL query returning 0 rows after adding extra INNER JOIN

The issue is simple to explain, but seemingly not so simple to solve. This SQL query returns 0 rows: This one, however, returns 1 row as I expected: The only difference is the lack of INNER JOIN with the org_depts table. What I want to be returned is all the column values from app_handover, which references sys_logins.id in its sent_by

Find a record containing all or a part of a list of id of other table in a many-to-many relation on MySql/Jpa?

In my web application, I have 3 tables: TAB A: Recipes (id, name) TAB B: Recipes_Ingredients(id, fk_recipe,fk_ingredient, quantity) Bridge table TAB C: Ingredients (id, name) I need to find all the recipes(TAB A) that containing a provided list of ingredients (TAB C). Es: I provide a list of ingredients id like 111 (spaghetti), 222(pepper), 333(oil) and I need to find

How to display only results matching a certain condition in SQL?

I would appreciate your help very much as Iā€™m still at beginner level in SQL. Thank you šŸ™‚ I have tables representing counties, vendors and their respective sales of stationery products. I have to display only the counties where the sum of all sales exceeds 100 without counting vendor 2 (Randall). For these counties I need county name, vendor name

Advertisement