A: 
SELECT OrdersName,OrdersSurname,OrdersEmail,OrdersPhone from Orders
WHERE TO_DAYS(NOW()) - TO_DAYS(OrdersFinishedTime) > 180
ORDER BY OrdersFinishedTime DESC
LIMIT 1;

Last order which is more than 180 days ago.

Spilarix
A: 

try this:

SELECT `OrdersName`, `OrdersSurname`, `OrdersEmail`, `OrdersPhone` FROM `Orders ` WHERE `OrdersFinishedTime` < SUBDATE(NOW(), 180);
Fabian Martin
A: 

Surely something like the following would do the trick.:

SELECT DISTINCT OrdersName,OrdersSurname,OrdersEmail,OrdersPhone FROM Orders
   WHERE OrdersID IN 
       (SELECT OrdersID FROM Orders 
        WHERE OrdersFinishedTime < (NOW() - INTERVAL 180 DAY))
Richard Harrison
this returns all the orders with the finished date more than 180 days ago... What I need is only the LAST order which is more than 180 days ago
Artis
now revised to only pull out the last customer based on order date
Richard Harrison
A: 

SELECT * FROM Orders WHERE OrdersFinishedTime < DATE_SUB(NOW(), INTERVAL 180 DAY)

Thomas