select * from (

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_GadelCampinas' as Banco from [LexManager_GadelCampinas].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_GadelCuritiba' as Banco from [LexManager_GadelCuritiba].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_RotaDasPanelas' as Banco from [LexManager_RotaDasPanelas].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_CavernaStore' as Banco from [LexManager_CavernaStore].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_AllForManLeopoldina' as Banco from [LexManager_AllForManLeopoldina].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_LightnessModas' as Banco from [LexManager_LightnessModas].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_FinckReal' as Banco from [LexManager_FinckReal].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_RomanelliLanches' as Banco from [LexManager_RomanelliLanches].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_Diving' as Banco from [LexManager_Diving].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_AsFilhasDaMaeN' as Banco from [LexManager_AsFilhasDaMaeN].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_Duosiscomercio' as Banco from [LexManager_Duosiscomercio].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_ProtecBagFortaleza' as Banco from [LexManager_ProtecBagFortaleza].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_EloisaFaria' as Banco from [LexManager_EloisaFaria].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_KidBrinquedos' as Banco from [LexManager_KidBrinquedos].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_PretoebrancoMultiloja' as Banco from [LexManager_PretoebrancoMultiloja].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_FelicitaTaboao' as Banco from [LexManager_FelicitaTaboao].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_Crystal' as Banco from [LexManager_Crystal].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_Lola' as Banco from [LexManager_Lola].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_Mi2' as Banco from [LexManager_Mi2].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_SantoLuxo' as Banco from [LexManager_SantoLuxo].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_GadelFigueira' as Banco from [LexManager_GadelFigueira].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_Barbaresco' as Banco from [LexManager_Barbaresco].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_Supplement' as Banco from [LexManager_Supplement].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_VIPCalcados' as Banco from [LexManager_VIPCalcados].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_Verbena' as Banco from [LexManager_Verbena].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_LaBigoderia' as Banco from [LexManager_LaBigoderia].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_ImpactSkateMultiLoja' as Banco from [LexManager_ImpactSkateMultiLoja].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_Cemak' as Banco from [LexManager_Cemak].dbo.auxLog  order by datahora desc) as COns  union all

select * from (select top 1 DATEDIFF(day,DataHora, GETDATE()) as DiasSemAcesso, 'LexManager_FelipeKerber' as Banco from [LexManager_FelipeKerber].dbo.auxLog  order by datahora desc) as COns  

) as Cons3

where DiasSemAcesso > 30