Câu truy vấn Query ...
 
Notifications
Clear all

Câu truy vấn Query danh sách khách hàng chưa đặt hàng trong 1 năm qua

1 Posts
1 Users
0 Likes
240 Views
admin
Posts: 334
Admin
Topic starter
(@admin)
Prominent Member
Joined: 2 years ago

Dùng câu query để có danh sách khách hàng chưa đặt hàng của doanh nghiệp để tiện thăm hỏi và tìm hiểu nguyên nhân:

select T0."CardCode", T0."CardName" 
from OCRD T0
where T0."CardType" = 'C' and T0."frozenFor" = 'N'
and T0."CardCode" not in (select distinct "CardCode" from ORDR where DAYS_BETWEEN ("DocDate", CURRENT_DATE) < 365);

 

Reply
Share:
x  Powerful Protection for WordPress, from Shield Security
This Site Is Protected By
Shield Security