I have a table with the mes E ano fields. How can I sort results by month?
I am already ordering by the year
= > SELECT * FROM tabela WHERE id_cliente = '$id_cliente' ORDER BY ano DESC
Now how can I order the months too...
I think my title is not a question.
The application I develop inserts data pertaining to the last backup into a table once a month. This table contains the backup instance code, the given insert and the number of bytes.
The problem is...
I'm servicing a bank and I'm having trouble making a select .
Structure of table descontos_taxas :
id | value | customer | data_created
My Scenario: This table stores both fees and discounts in the same table. The rates are posit...
I'm having the following result:
Mes | QtdPorMes
1 | 124
2 | 102
3 | 84
4 | 32
I would need it to look like this:
Mes | Boleto | Cartão | Total
1 | 100 | 24 | 124
2 | 82 | 20 | 82...
I am creating a query in SQL , but I need a field not to display the values when it is zero.
Is it possible?
SELECT gfilial.nomefantasia AS 'Filial',
tmov.codtmv AS 'CODTMOV',
tmov.numeromov AS 'Número',
tmov.valo...
When trying to give a drop table in a table that has relationships, the following error occurs: #1451 - Não pode apagar uma linha pai: uma restrição de chave estrangeira falhou
Is there any way to force deletion of the table...
How to concatenate all results of a query in SQL Server in order to return all information in a variable?
For example, considering a cliente table with the following composition:
╔═══╦════════════╗
║ ║ Nome ║
╠═══╬════...
The question asks me to show the number of students with averages greater than 7, less than 7 or equal to 7 for some tables that I have here. Showing this way:
How to create this column of Description ?
I would like to perform a SQL to get a list of dates on the last day of each month.
Example:
From a list of 01/01/2016 until 12/31/2016 return the last days of each month: 1/31/2016, 2/28/2016 ... 12/31/2016.
The database is in FileMaker....