There is a sqlite database, in which one table (see screenshot) enter image description here

It is necessary to display 1 recipe field and all ingridient fields related to it, if the request coincides with the ingredient. For example: query = "Water" -> Display 1 field Mors Blueberry and all its ingredients. Compiled such a query SELECT DISTINCT * FROM receptes WHERE ingridient = "запрос"; Did I do everything right?

  • And why distinct? Usually with * it is not used, because at least one field of another record will not be the same as the previous one, which means the line will be unique and the output will not change anything except an increase in the execution time - Mike
  • @Mike, you're right. I just wanted to get the output of only 1 recept - Felay field
  • then specify this one field, instead of * , and distinct if necessary, if you need to suppress the same values ​​when outputting - Mike
  • @Mike And how do I get the ingredients? - Felay 2:49 pm
  • It is impossible to answer your question because you have not led the structure of the tables. But in general, why are you asking if the request is correct, the check takes 5 seconds, if it gives what is expected, then it is probably the right one - Mike

0