答案 0 :(得分:0)
执行conflicting types for 'pthread_t'
并将JOIN
与GROUP BY
和COUNT()
一起使用:
MAX()
但是,在MS Access中,concat是:
SELECT CONCAT(c.Cus_FName, ' ' c.Cus_LName), COUNT(p.Pet_ID), MAX(p.Pet_LastVisit)
FROM Customer c INNER JOIN
Pet p
ON p.Cus_num = c.Cus_num
GROUP BY CONCAT(c.Cus_FName, ' ' c.Cus_LName);
答案 1 :(得分:0)
使用联接和聚合
select c.cus_num,c.cus_Lname,count(p.pet_id) as numberofpets,
max(p.Pet_LastVisit) as last_visit
customer c join pet p
on c.cus_num=p.cus_num
group by c.cus,c.cus_Lname
答案 2 :(得分:0)
select CONCAT(CONCAT(cus_fname, ' '), cus_lname) as customer_name,
count(p.pet_id) as number_of_pets,
max(p.pet_lastvisit) as last_visit
from customer c, pet p
where c.cus_num=p.cus_num
group by customer_name
order by customer_name desc