Showing posts with label 170 ) 10 ) customers Historical addresses. Show all posts
Showing posts with label 170 ) 10 ) customers Historical addresses. Show all posts

Monday, August 10, 2026

170 ) 10 ) customers Historical addresses

 


================================================================
10 ) customers Historical addresses  
================================================================
Note : ( for this "order"table should save the delivery address also )

 ================================================================

SELECT
    o.OrderID,
    o.CustomerID,
    o.OrderDate,
    o.DeliveryAddress AS OrderDeliveryAddress,
    c.CustomerName
FROM 
    [order] o
JOIN 
    customer c ON o.CustomerID = c.CustomerID;
================================================================

Sample Output

OrderIDCustomerIDOrderDateOrderDeliveryAddressCustomerName
10112026-06-01123 Main St, New York, NYAlice Smith
10212026-06-18999 New Pine Rd, Boston, MAAlice Smith
10322026-06-20456 Oak Rd, Austin, TXBob Jones
 

173 ) 14 ) Query to find duplicate rows of loan id but time is different

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 14 )  Query to find duplicate rows of loan id but time is different  ~~~~~~~~~...