I need to create a purposive Cartesian product, for a report in Fast reports
or multiply my data by a certain number
EX:
select
cli.cdclifor,
CLI.nmCliFor
from
cadclifor cli
where cli.cdclifor = '000001'
result:
000001 Jõao das Cou...
3 tables: Processo , Evento , Alerta
The goal is to make a query that returns all processes by adding the columns of the event type and date of the most recent event MAX(DataEvento) and the next alert (smaller date g...
The need to create a Role with accent in the Roles table of Identity in the database: "Technical".
Myquestioniswhetherthiscanleadtofurtherproblems,perhapswhencheckingforsomethinglikeUser.IsInRole("Técnico") or if the...
I have a real estate website that I'm implementing the favorites option. When you open the property and click favorite, it should insert a new row in the favorite table, the one below (status 1 is favorite), and if you "uncheck" it removes the r...
I need to filter all clients that have an anniversary date between two reported dates in a query. How can I make a comparison of dates disregarding the year registered in the client?
The current query looks like this:
Parameters reported:...
I am doing a SQL query to bring users, but I consult 2 tables: users and users_vip
No users have all users and users_vip only those that are vip (active or not).
When I make my query joining the 2 tables it only brings who has a registrati...
I have a query that has a condition, which checks whether the record is greater than or equal to today's date.
It looks like this:
WHERE t1.bidpack_buy_date => NOW()
Well, it will check if the value of the bidpack_buy_date colu...
I'm using PostgreSQL on a system of extensions and I have two tables here. One that stores the extensions and the other one that stores the permission to connect these extensions.
This second table is structured like this:
InthesystemImou...
Table: PEOPLE
id - nome
1 - BEATRIZ
2 - MARIA
3 - CARLOS
4 - MARIA
5 - JÉSSICA
6 - HENRIQUE
How can I make a SELECT that gives me a list with the names sorted by ID descendente , however, a certain NAME first and below the cont...
I have the following query
select id,
nome,
user_id
from (select * from users
order by user_id, id) users,
(select @pv := '2') initialisation
where find_in_set(user_id, @pv) > 0
and @pv := conc...