Skip to content

Tag: database

Avoiding redundancy in database tables sql mysql

I have a question please. I am developing an online mall website. I have an orders table.. I have put the product_id as an attribute in order to know which product is ordered. In the customer’s purchase history page, I need to present all the orders purchased by the customer, including the product title…

How to create a table address and query it by states?

How can I create a table with following schema: I wrote the above query for creating the table. But I’m not able to link this table to another table for the query shown below and fetch all state names and total of account balance for the users belonging to those states. Answer You should be able to use …