0

Note that my table files are stored in .csv format.

Here are the elements of my table 1(TABLE1):

Food Food Price Food Order Food Quantity

Here are the elements of my second table(TABLE2):

Food Order Food Delivery time

Here's what I want to do:

SELECT 'Food','Food Price','Food Order','Food Quantity','Food Delivery time'
FROM TABLE1,TABLE2
WHERE TABLE1.'Food Order'==TABLE2.'Food Order';

Also after that I want to compute another metric which is defined as 'Quantity Units' and is equal to 'Food Price'/'Food Quantity'.

I am totally new to SQL so do let me know if there's any syntax mistake I am doing here.

Shivam Sahil
  • 4,055
  • 3
  • 31
  • 62
  • Enclose the column names in backticks (`), not single quotes – Nick Apr 09 '20 at 07:47
  • Null safe equal in mysql is <=>. Not an errot but you should use explicit (JOIN) rather than comma joins.AND food_order(and possibly other columns) will give an ambiguous column error. In the case of possible ambiquity(of source table) qualify column name with table name. – P.Salmon Apr 09 '20 at 07:54

0 Answers0