Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
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 II
Partner - Master II

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;