strstr(function)
Returnsa pointer to the irst occurrence of str2 in str1, or a null pointer if str2 is not part of str1. (函数返回字符串str2在字符串str1中第⼀次出现的位置)。 The matchingprocess doesnot include t…
1251. 平均售价 题目链接:1251. 平均售价
代码如下:
# Write your MySQL query statement below
select p.product_id,round(ifnull(sum(units*price)/sum(units),0),2) as average_price
from Prices as p
left join UnitsSold as u
on p.product_id…