我有一个解决方案
global $wpdb;
$db= $wpdb->prefix.\'booking\';
$dbAdditonal= $wpdb->prefix.\'booking_additionals\';
$booking = $wpdb->get_results("
SELECT b.*,
IFNULL(GROUP_CONCAT(ba.NamePack SEPARATOR \'<br />\'),\'N/A\') Extras,
FORMAT(IFNULL(SUM(ba.Price),0)+IFNULL(b.Price,0),2) AS Total
FROM
$db b
LEFT JOIN $dbAdditonal ba ON b.Id_Booking = ba.Fk_IdBooking
GROUP BY Id_Booking ",ARRAY_A);