Skip to content

Tag: join

MYSQL getting data from three tables

I am trying to find the drinker and total amount of money spent on drinks for all drinkers in February 2020. I also need to include drinkers who haven’t ordered a drink in this period. Here are the three tables: Here is my statement so far: I am very new to SQL, I know that there are a number of

How can I translate this SQL code to R script using dplyr?

I’m currently working on a project and I want to summarize a column from a joined table twice. SQL code is this: …and the result is this: Database tables are as shown here: I hope that I have provided all the information needed. Question: How can I have the same result in R by only using dplyr lib…

Select based on multiple ID’s in the same column

I have two SQL tables already built (not by me) : One table that has all the ingredients with ID’s assigned to them : and the second table that has finished products that have reference to ingredientID in the ProductIngredients column but no the product name and they are built like this : If they don&#8…