Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Lucky1
Creator
Creator

converting sql into qliksense

Hi I have a query in sql like below 

select count(1) from Travel where to_char(start_date, 'YYYY')

in (2023) and cwt_jv_data_unique_id is null and cwt_data_unique_id is null and gbt_data_unique_id is  null; 

 

How to write this in qliksense

1 Reply
BrunPierre
Partner - Master
Partner - Master

Hi, something like this, and then do a sum on field "NoOfRecords" in the front end.

TravelData:
LOAD *,
Count(DISTINCT NOR) as NoOfRecords
Group By start_date,
cwt_jv_data_unique_id,
cwt_data_unique_id,
gbt_data_unique_i,
NOR;

LOAD start_date,
cwt_jv_data_unique_id,
cwt_data_unique_id,
gbt_data_unique_i,
RowNo() as NOR

Where Year(start_date) = Year(today())
and Len(Trim(cwt_jv_data_unique_id & cwt_data_unique_id & gbt_data_unique_id )) = 0;

SQL SELECT *
FROM YourDatabase.dbo.Travel;