Páginas

segunda-feira, 17 de agosto de 2020

DICAS 3034 - WINDEV TUTORIAL 57 - ESTATISTICAS GRAFICO PIVOT - QUERY ANO - PARTE A



https://youtu.be/DO9Dh_sk-Mc


Bom Dia/Boa Tarde/Boa Noite

Esse Ao Vivo vai estrear as 09:00 do dia 28/08/2020 

 
DICAS 3034 - WINDEV TUTORIAL 57 - ESTATISTICAS GRAFICO PIVOT - QUERY ANO - PARTE A
Tutoriel WINDEV : Leçon 4.8.a. Statistique (champs Graphe et Tableau croisé dynamique) - Requête

ASSUNTOS

EXPLICANDO O QUE SERA FEITO
CRIANDO UMA QUERY - SQL - 
SELECIONANDO CAMPOS DO PEDIDO, DATA E TOTAL
COLOCADO TOTALIZADOR SUM
COLOCANDO ORDEM POR DATA ANO 
MOSTRANDO O CODIGO SQL GERADO
EXECUTANDO A QUERY SQL 


Video original da Franca

https://youtu.be/LM-rqY92j6A


Playlist Windev TUTORIAL

SELECT 
SUM(Orders_pedido.TotalBT) AS sum_TotalBT,
LEFT(Orders_pedido.Date,4) AS Year_Data
FROM 
Orders_pedido
GROUP BY 
LEFT(Orders_pedido.Date,4)
ORDER BY 
Year_Data ASC













Lesson 4.8. Statistics: Chart and Pivot Table controls
This lesson will teach you the following concepts
  • Displaying data in a chart.
  • Creating summary tables via the Pivot Table control.
Lesson duration

Estimated time: 30 mn
Previous LessonTable of contentsNext Lesson
Overview
The presentation of statistics or summary tables is often required in a management application. This type of presentation can be used for example to follow:
  • the evolution of orders in time,
  • the evolution of turnover,
  • the evolution of stocks,
  • ...
Any executive manager wants to get this information.
WINDEV proposes several controls allowing you to easily include this information in your applications. Two specific controls will be used in this lesson:
  • the Chart control.
  • the Pivot Table control.

Answer

If you did not create the windows in the previous lessons, you can follow this lesson by opening a corrected project: in WINDEV's home page (Ctrl + <), click "Tutorial" and select "Full application (with windows)".
A full corrected application project is also available: in WINDEV's home page (Ctrl + <), click "Tutorial" and select "Full application (Answer)".
Displaying data in a Chart control
To handle the Chart control in real conditions, we are going to create a Chart control displaying the status of sales in the "WD Full Application" application.
First of all, we are going to create a query used to select the data that will be displayed in the Chart control.

Selecting the data that will be displayed in the Chart control

To create our chart, we want to get the sum of orders by date.
We are now going to create a query used to perform a sum. Indeed, we are going to calculate the total amount of orders (TotalIOT item in the Orders data file).
We are going to calculate the total amount of all orders per date (the Turnover per date).
  • Create a new query:
    1. Click Create an element among the quick access buttons.
    2. The element creation window appears: click "Query".
    3. We are going to create a select query. Select the "Select" option. Go to the next step.
    4. The query description window appears.
    5. Add the items Orders.Date and Orders.TotalIOT to the query:
      • On the left, expand the "Orders" data file.
      • Double-click the Date item then the TotalIOT item.
      • The two items appear in the middle of the screen (in the "List of elements in your query" area).
  • To calculate the sum of values of "Orders.TotalIOT":
    1. Select the "Orders.TotalIOT" item in the middle.
    2. In the "Actions", on the right, select "Sum". The sum description window appears.
      Query - Sum description window
    3. Validate the sum description. The sum of "TotalIOT" was added into the list of query result.

Remark

You will notice that the query editor of WINDEV creates the queries in everyday's language (and also in SQL language).
Query description in common language
This allows you to check the purpose of your query.
  • We are now going to group the data by year and to sort it:
    1. Select the "Orders.Date" item in the middle.
    2. In the "Actions", on the right, click "Year, month" and select "Year". A window appears allowing you to create the Year item:
      Sort by year
    3. Validate this window ("OK").
    4. The "Year" item is displayed in the middle of the query description.
    5. Select the "Year" item and define the sort:
      • Open the popup menu of the "Year" item.
      • Select "Sort item .. Sort in ascending order".
      • An arrow appears in the query description, indicating the sort type.
  • The query is created. We are going to give it a name and to save it.
    1. At the top of the query description window, enter:
      • the name "QRY_SalesEvolutions".
      • the caption "Sum of orders by date".
    2. Validate the query description window.
    3. The save window is displayed. Validate the proposed information.
    4. The graphic query representation is as follows:
      Graphic representation of the query


DICAS 2978 - WINDEV TUTORIAL 1 - 1.1B - WINDEV TEMA ESCURO E IDIOMA DO AMBIENTE
DICAS 2979 - WINDEV TUTORIAL 2 - 1.2- CRIAR JANELA E INSERIR TEXTO E EXIBIR
DICAS 2980 - WINDEV TUTORIAL 3 - 2.1- VARIAVEIS PARTE 1
DICAS 2981 - WINDEV TUTORIAL 4 - 2.2- VARIAVEIS ESCOPO - PARTE 2
DICAS 2982 - WINDEV TUTORIAL 5 - 2.1- VARIAVEIS OPERADORES PARTE 3
DICAS 2983 - WINDEV TUTORIAL 6 - 2.1.D - VARIAVEIS STRINGS PARTE 4
DICAS 2984 - WINDEV TUTORIAL 7 - 2.1.E - VARIAVEIS ARRAYS PARTE 5
DICAS 2985 - WINDEV TUTORIAL 8 - 2.2.A - CONDICOES IF-SWITCH PARTE 1
DICAS 2986 - WINDEV TUTORIAL 9 - 2.2.B - CONDICOES PARTE 2
DICAS 2987 - WINDEV TUTORIAL 10 - 2.3.A - LOOP PARTE 1
DICAS 2988 - WINDEV TUTORIAL 11 - 2.3.B - LOOP EXEMPLOS PARTE 2
DICAS 2989 - WINDEV TUTORIAL 12 - Lesson 2.4. The procedures - PARTE 1
DICAS 2990 - WINDEV TUTORIAL 13 - Leçon 2.4.b. Procedures Parametros - PARTE 2
DICAS 2991 - WINDEV TUTORIAL 14 - PROCEDURES REFERENCIA - PARTE 3
DICAS 2992 - WINDEV TUTORIAL 15 - PROCEDURES OPCIONAIS OU OBRIGATORIAS - PARTE 4
DICAS 2993 - WINDEV TUTORIAL 16 - PROCEDURES EXEMPLOS - PARTE 5
DICAS 2994 - WINDEV TUTORIAL 17 - PERGUNTAS E RESPOSTA - PARTE 1
DICAS 2995 - WINDEV TUTORIAL 18 - PERGUNTAS E RESPOSTA - PARTE 2
DICAS 2996 - WINDEV TUTORIAL 19 - WINDEV E OS BANCOS DE DADOS
DICAS 2997 - WINDEV TUTORIAL 20 - PROJETO E ANALISE - CRIACAO
DICAS 2998 - WINDEV TUTORIAL 21 - PROJETO E ANALISE - ARQUIVOS DADOS CLIENTE - PARTE 2
DICAS 2999 - WINDEV TUTORIAL 22 - PROJETO E ANALISE - ARQUIVOS DADOS CRIACAO ARQUIVO PEDIDO - PARTE 3
DICAS 3000 - WINDEV TUTORIAL 23 - PROJETO E ANALISE - IMPORTANDO CVS-ARQUIVO TEXTO - PARTE 4
DICAS 3001 - WINDEV TUTORIAL 24 - PROJETO E ANALISE - IMPORTANDO ARQUIVO PRODUTO - PARTE 5
DICAS 3002 - WINDEV TUTORIAL 25 - PROJETO E ANALISE - LINK - PARTE 6
DICAS 3003 - WINDEV TUTORIAL 26 - RAD COMPLETO
DICAS 3004 - WINDEV TUTORIAL 27 - VISAO GERAL
DICAS 3005 - WINDEV TUTORIAL 28 - Adicionar e Modificar Janelas PRODUTOS - PARTE A
DICAS 3006 - WINDEV TUTORIAL 29 - Adicionar e Modificar Janelas PRODUTOS Formulario - PARTE B
DICAS 3007 - WINDEV TUTORIAL 30 - Adicionar e Modificar Janelas PRODUTOS ALINHAR CAMPOS - PARTE C










Nenhum comentário:

Postar um comentário