Help with Group By on an Inner Join Sql Server

Asked

Viewed 12 times

0

Good morning Gentlemen.

I have the following Sql Query below that links data from two tables, the table Tab_dados_producao and Tab_data_choice

Code:

SELECT 

E3_GERAL.dbo.Tab_Dados_Producao.[E3TimeStamp] As 'Data',
E3_GERAL.dbo.Tab_Dados_Producao.Maquina As 'Maquina Linha',
E3_GERAL.dbo.Tab_Dados_Escolha.Maquina As 'Maquina Escolha'

FROM [E3_GERAL].[dbo].[Tab_Dados_Producao]

INNER JOIN [E3_GERAL].[dbo].[Tab_Dados_Escolha] ON [E3_GERAL].[dbo].[Tab_Dados_Producao].[E3TimeStamp]=[E3_GERAL].[dbo].[Tab_Dados_Escolha].[E3TimeStamp];

Upshot:

inserir a descrição da imagem aqui

I would need to use the Group By clause in my SQL Query, to organize future by day, month and year, but I can’t because there is an error message below, can you help me? Thanks

inserir a descrição da imagem aqui

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.