我在互聯網上發現了以下mysqli查詢。它顯示前3名銷售的汽車解釋顯示排名前3的汽車的MySQLi查詢
//create conection with mysql database.
$conn = mysqli_connect("localhost","root","","cars");
//query
$select = "SELECT ord.*, sum(amount) as amt from orders as ord GROUP BY id_car order by amt desc limit 0,3";
$data = mysqli_query($conn,$select);
此查詢工作正常,但我想如果有人能解釋我查詢的這個第一部分:SELECT ord.*,
這似乎是「ORD」是指訂單,但它如同說:SELECT * FROM orders
??
見截圖圖像 orders table
從訂單表中獲取所有字段。 – rahul