select orderid, employeeid from orders order by employeeid;
select orders.employeeid, count(orders.orderid) as c from orders group by orders.employeeid order by count(orders.orderid) desc;
SELECT * FROM customers WHERE customerid = 'ANTON'
select orders.orderid, employees.lastname from orders, employees where orders.employeeid = employees.employeeid order by employees.lastname;
select employees.employeeid, count(orders.orderid) as xx, first(employees.lastname) as x from orders, employees where orders.employeeid = emplyoees.employeeid group by employees.employeeid;
select orders.employeeid, first(orders.orderid) as x, count(orders.orderid) as c from (orders inner join employees on orders.employeeid = employees.employeeid) group by orders.employeeid;
select [order details].orderid, sum((unitprice * quantity) - (unitprice * quantity * discount)) from [order details] group by [order details].orderid;
MySQL String Functions MySQL Numberic Functions MySQL Date Functions MySQL Advanced Functions https://www.w3schools.com/sql/trysql.asp?filename=trysql_op_in https://www.w3schools.com/sql/sql_ref_mysql.asp https://www.w3schools.com/sql/sql_ref_sqlserver.asp SELECT ascii(left(customername,1)) as f01, char_length(customername) as f02, length(customername) as f03, concat("[",customername,"]") as f04, field(country,"Germany","Mexico","UK","Sweden") as f05 /* Germany = 1 */, format(1000,2) as f06 /* 1,000.00 */, lcase(customername) as f07, mid(customername,2,3) as f08 /* abcde = bcd */, replace(country,"Germany","GM") as f09 /* same as if */, bin(customerid) as f10, CASE WHEN country = "Germany" THEN "GM" WHEN country = "Maxico" THEN "MX" WHEN country = "UK" THEN "UK" ELSE "not found" END as F11, if(length(customername) > 20,"Long","Short") as f12 FROM Customers;