You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
selectpad_data.id,
coalesce(apps.slug,
blapps.slug,
'') as slug,
case
when (
select
id
from
ai_responses
where
pad_urls_id =pad_data.id) >0 then 1
else 0
end ai_published,
case
when ( (
selectCOUNT(pad_urls_id)
from
pad_apk_crawler
where
pad_urls_id =pad_data.idand is_done = true
and step ='finished'and last_version <>'') >0or ((pad_data.pflags ? 'has_apk'orpad_data.pflags ? 'has_xapk')
and (pad_content.override#>> '{primary_download_url}' like 'apk://%'orpad_content.override#>> '{primary_download_url}' like 'dld://%')) ) then 1
else 0
end have_apk,
pad_data.status,
pad_data.tries,
pad_data.created_at,
pad_data.updated_at,
pad_data.response,
pad_data.valid_status,
pad_data.priority,
pad_data.validated_at,
pad_data.download,
pad_data.lang_id,
pad_data.lang_score,
coalesce(apps.views_total,
blapps.views_total,
0) as views_total,
coalesce(apps.views_month1,
blapps.views_month1,
0) as views_month1,
coalesce(apps.views_week1,
blapps.views_week1,
0) as views_week1,
coalesce(apps.views_day1,
blapps.views_day1,
0) as views_day1,
coalesce(apps.have_review,
blapps.have_review,
false) as have_review,
initcap(coalesce(apps.ad_type,
blapps.ad_type,
'')) as ad_type,
coalesce((apps_data.json_review->>'publish_date'::text),
(blapps_data.json_review->>'publish_date'::text),
'') as review_publish_date,
coalesce(app_info.distrib_status,
'') as distrib_status,
coalesce(app_info.distrib_at,
'1970-01-01') as distrib_at,
coalesce(app_info.sync_at,
'1970-01-01') as sync_at,
coalesce(app_info.sync_status,
'') as sync_status,
pad_content.json_data#>> '{xml_diz_info,program_info,program_name}' as program_name,pad_content.json_data#>> '{xml_diz_info,company_info,company_name}' as company_name,
case
when apps.idis not null then 1
else 0
end is_visible,
case
when blapps.idis not null then 1
else 0
end is_blacklisted,
case
when apps.idis not null then 1
else case
when blapps.idis not null then 2
else 0
end
end is_active
from
pad_data
left joinlive_website.appson
(pad_data.id=apps.id)
left joinlive_website.apps_dataon
(pad_data.id=apps_data.id)
left joinwebsite_soft112.blappson
(pad_data.id=blapps.id)
left joinwebsite_soft112.blapps_dataon
(pad_data.id=blapps_data.id)
left joinwebsite_soft112.app_infoon
(pad_data.id=app_info.id)
left join pad_content onpad_data.id=pad_content.idleft join ai_responses on
(pad_data.id=ai_responses.pad_urls_idandai_responses.is_active= true
andai_responses.published<>'')
order bypad_data.idasclimit25 offset 0
The text was updated successfully, but these errors were encountered:
This sql is not parsed corectly
The text was updated successfully, but these errors were encountered: