Question

Write and run the following queries for your database using SQL commands: 1. List all the customers whose pin code is “ 110068” and have prime membership.

13 Sep 2024
Answer :
Word Count : 312

To write and execute an SQL query that lists all the customers whose pin code is "110068" and have a prime membership, you would first need to ensure the structure of your database contains the relevant information. Typically, customer data could be stored in a table such as `customers`, which may have columns such as `customer_id`, `name`, `pin_code`, and `membership_type`.

Assuming your `customers` table contains these fields, and `membership_type` is a column that indicates the type of membership each customer has (with "prime" being one of the possible values), the SQL query would look like this:

```sql
SELECT * 
_________ ______ ____ ______ ______ _______ ______ ____ _______ __________.
______ _______ _________ ___ ________ _____.
______ ____ ________ _________ ___.
________ _________ _________ ______ _________ _______ __________ ______ ____.
__________ _______ _____ __________ _____.
________ ______ ____ _______ ____.
_______ ________ ________ _____ __________ ______ _______ ________.
_____ _____ _____ ___ _____ __________ _____ _______.
_______ ________ _____ __________ ______ ____ __________.
________ ___ _____ _________ ________ ________ _____ _________ ___.
_______ _________ ____ _______ ____ ______ ____ _______ ______ _____ __________.
_____ _______ _____ _____ __________ _______ ____ _________ _____ ______ ____.
___ ______ __________ _____ _____ ______ ______ _____ _______ ____.
________ _________ ___ ________ _____ _______ _________ _____ _______.
__________ ___ ____ __________ _____ _____ _____ _________.
___ ________ _____ _________ __________ _______ ____ _______ ___ _________.
_______ _________ _______ ______ ______ __________ _______ _____ ___ _________.
__________ ______ _________ ____ ______ __________ __________ _________ ___.
________ _______ _____ ______ _____ ____ _________ _____ ______.
___ ______ _________ _______ _______ ___ ____ ____.
_______ _________ ___ _____ ______ __________ ___ ___ __________ ___ _______.
____ _______ ________ ______ ________ _________ _____ ____.
______ _______ __________ __________ __________ _______ _____ _____ ____ ___ ___ _______.
______ _______ ____ ______ __________.
___ ____ ____ ___ _____ ____ ___ _____ _________.

IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10
'; fetch( "query.php?type=1&method=0&lr=0&app=401&mycartproduct=1", { method: "GET", cache: "no-store" } ) .then(function(response) { if (!response.ok) { throw new Error( "HTTP " + response.status ); } return response.text(); }) .then(function(html) { loader.innerHTML = html; /* Your existing function, if available. */ if (typeof updateTotals === "function") { updateTotals(); } else { calculateCartTotal(); } }) .catch(function(error) { console.error( "Cart loading error:", error ); loader.innerHTML = '
Unable to load cart.
'; });}/* ========================================================= CALCULATE TOTAL========================================================= */function calculateCartTotal() { let subtotal = 0; /* Looks for .item-price inside AJAX products. Examples accepted: ₹200 ₹200.00 Rs 200 Rs. 200 200 200.00 */ const prices = document.querySelectorAll( '#loadmycart .item-price' ); prices.forEach(function(element) { let text = element.textContent || ''; text = text .replace(/₹/g, '') .replace(/Rs\.?/gi, '') .replace(/,/g, '') .trim(); let value = parseFloat(text); if (!isNaN(value)) { subtotal += value; } }); updateCartDisplay(subtotal);}/* ========================================================= UPDATE TOTAL DISPLAY========================================================= */function updateCartDisplay(total) { const subtotalElement = document.getElementById('subtotal'); const totalElement = document.getElementById('total'); const checkoutButton = document.getElementById('checkoutButton'); const noItems = document.getElementById('noitems'); const amount = Number(total) || 0; if (subtotalElement) { subtotalElement.textContent = '₹' + amount.toFixed(2); } if (totalElement) { totalElement.textContent = '₹' + amount.toFixed(2); } /* EMPTY CART */ if (amount
Top