title: How can I make this query in mysql with multiple select statements?
body: <p>I want to make this query with multiple statements but I don't know how. Please help me. Thank you! :)</p>
  
  <pre><code>SELECT 
        customerNumber AS 'Customer Number', 
        customerName AS ' Customer Name',
        quantityordered AS 'Quantity Ordered', 
        amount AS 'Amount',
        SUM(quantityOrdered*amount) AS 'Total Amount'
     FROM 
        customers 
           INNER JOIN orders USING (customerNumber) 
              INNER JOIN orderdetails USING (orderNumber)
           INNER JOIN payments USING (customerNumber)
     WHERE 
        quantityOrdered &gt;= 50
     GROUP BY 
        customerName 
     HAVING 
        COUNT(quantityOrdered) &gt; 5 
     ORDER BY 
        3;
  </code></pre>