SQL requests with group by and order by
updated_at196
1
(for a week ago) 296
5
(Today) 396
6 (Today) 497
10
(It does not matter)
I need to group them by thread_id and sort them by date.SELECT *
From the table_log
Group by thread_id
ORDER BY updated_at But this ORDER BY version does not work.
I have to get a result of this kind:
thread_id: 96. user_id: 1. updated_at: today
a receives: thread_id: 96. user_id: 6. updated_at: a week ago
Client's review of cooperation with Vitalii Valchuk
SQL requests with group by and order byThe task was to make a request in mysql. He did it well and explained how and why.
I recommend, and I will contact myself, thank you!
Freelancer's review of cooperation with Vladislavs Sipov
SQL requests with group by and order byI have provided full TZ, always in contact, I recommend!
-
2071 226 0 1 Hello to you. I will help with your request. The group does not work as you described.
-
38 Good day .
I will send you a request quickly.
Go to turn.
_________________________________________________________
-
5817 264 0 Good night, ready to write a request.
Good night, ready to write a request.
-
2641 427 9 1 Готов составить запрос
=- = -= -=- =- =- =- = -= -= -= -= -= - =- = -= -= -= - =- =- = -= -= -= - =- =- = -= =-
-
двумя order by разрешается?
-
если в поле дата там штам то только приводить его к одному виду (дата) и делать группировку по этому полю тоже, ну или формировать вьюшку, а потом выборки
-
Current freelance projects in the category Databases & SQL
Accounting, planning, and sales system for a mushroom farm
600 USD
Here is the complete, final text of the Technical Assignment (TA). It combines all your requirements: 16 chambers, 20 contractors, a schedule by days, accounting for containers, profitability calculation, and a mandatory division into three grades of mushrooms. You can fully… Databases & SQL, Client Management & CRM ∙ 1 day 5 hours back ∙ 51 proposals |
External report 1C 8.3 — forecast of goods balances
22 USD
An external report (.erf) is needed for 1C:Enterprise 8.3 (configuration to be specified). What it should do: Extract product balances from the database Analyze sales history for the last 30 days Calculate the average sales rate for each product Determine how many days until the… Databases & SQL, Client Management & CRM ∙ 1 day 5 hours back ∙ 11 proposals |
Web Application & Database Security Audit for Custom CRM — BaaS / Database-as-API Specialist (PenetrProject Overview We operate a custom-built customer relationship management (CRM) platform that runs two service businesses on a single system. It is a modern JavaScript web application backed by a backend-as-a-service (BaaS) database and deployed on a serverless hosting… Databases & SQL, Testing & QA ∙ 1 day 18 hours back ∙ 9 proposals |
Database synchronizationSynchronization of Microsoft Access programs and CRM SalesDrive. Data transfer from CRM to Microsoft Access in the first stage (changing the funnel status). Data transfer from Microsoft Access to CRM in the second stage (changing the status in the program). Databases & SQL ∙ 2 days back ∙ 10 proposals |
Setting up a backup system and optimizing server infrastructureObjective of the work: Ensure reliable data storage for the CRM system and application by implementing an automated backup system, as well as carry out a series of server improvements to enhance the stability, security, and performance of the infrastructure. DevOps, Databases & SQL ∙ 2 days 22 hours back ∙ 24 proposals |