Caitlin Ross, #040750891 CST8215 Database Answers to Step 2 in Assignment 2 How many customers exist for this ecommerce website? -200 sql: SELECT COUNT(customer_id) FROM customers; How many products are available in the ecommerce website? -50 sql: SELECT COUNT(product_id) FROM products; What are the number of shipping addresses from Ontario? -21 sql: SELECT COUNT(address) FROM shipping_details WHERE province LIKE 'ON'; Which payment type is most common? - Credit Card sql: SELECT COUNT(payments.payment_id), payment_info.payment_type FROM payments INNER JOIN payment_info ON payments.payment_info_id = payment_info.payment_info_id GROUP BY payments.payment_info_id; How many invoices were issued in 2013? -21 sql: SELECT COUNT(invoice_id) FROM invoice WHERE invoice_date LIKE '2013%'; Do an inner join from customers on shipping_details ON shipping_detail_id? How many results are displayed? -200 sql: SELECT COUNT(*) FROM customers INNER JOIN shipping_details ON customers.shipping_detail_id = shipping_details.shipping_detail_id; Which product (product_id) is ordered the most by customers in customer_product table? -49 sql: SELECT product_id, SUM(ordered_amount) FROM customer_product GROUP BY product_id ORDER BY SUM(ordered_amount) DESC; What is highest amount on invoice? - 250 sql: SELECT MAX(amount) FROM invoice; What is the invoice no. dated 2014-03-11? - 394044 sql: SELECT invoice_no FROM invoice WHERE invoice_date LIKE '2014-03-11';