SQL query help
Ngân sách €8-15 EUR
- Freelancer
- Các công việc
- Phát triển cơ sở dữ liệu
- SQL query help
Job Description:
I need some help how to successfully order my data.
I have a table with the following fields:
ID,
ID_Parent,
Created_At,
...
ID and ID_Parent are not integer but a random 8 number string like xxxx-xxxx
The table holds information for parent and child records. For example
1000-0000 Parent 1
5001-1000 Child 1 of Parent1
3001-2500 Child 2 of Parent1
2529-5000 Parent 2
3501-1010 Child 1 of Parent1
What I want is to order records based on date DESC (Created_at) and display one expanded record set just after the parent record for example. Example #1:
19-Dec-2014 Parent 3
20-Dec-2014 Child 2 of Parent 5
19-Dec-2014 Child 1 of Parent 5
10-Dec-2014 Parent 2
05-Dec-2014 Parent 1
Example #2:
19-Dec-2014 Parent 3
10-Dec-2014 Parent 2
05-Dec-2014 Parent 1
10-Dec-2014 Child 2 of Parent 1
05-Dec-2014 Child 1 of Parent 1
Execute the SQL query to the SQL table attached on this project:
select id, id_parent from order_items
where id_parent = '1077-2649' or id_parent = '0'
order by created_at
you will see its not correctly sorted:
[login to view URL]
SQL data/script Download link:
https://www.sendspace.com/file/g5of2b
47 freelancer chào giá trung bình€14 cho công việc này
Between 2009 to Present, I worked as a web application, mobile application and desktop application developer for several employers. In terms of my accomplishments: MVC framework with Entity Framework in .net,Angular Thêm
Hello, I think we worked together before and I'm interested to work again with you. I have good SQL experience and help you doing this small task. Regards.
I am sql expert certified by Oracle corporation and having more then 5 yrs of experience in sql Oracle and mysql.. I have already made query and result coming perfect i can send you screen short
Hello, I have been working with a MNC based company since last ~ 5 years, as an IT BI DWH Professional. The project is a BI DWH project which covers 3 layers of BI (ETL, Data warehouse & Reporting) and helped me in Thêm
Hi, I am 16+ years experienced Database Programmer at CMMI-5 level company. I am Personally working on : RDBMS : MS Access,Oracle,MySQL, MSSQL Server 7.0/2000/2008R2 and Onwards. Database Tools : Database Configur Thêm
Hello sir/madam, we have read and understand your requirement and very much confident that we can complete this project within low budget and less time . Give us chance to serve you better Looking forward to be Thêm
Hello I am Software Engineer and Expert in Sql optimization So you can consider me for this Project Thanks I wil wait for your quick Response
Hello Sir, we are ready to start working on your project instant. Feel free to ask us any questions that you have. Thanks and regards!
Use this query: select created_at,id,id_parent from order_items where id_parent = '1077-2649' or id='1077-2649' order by id_parent ASC, created_at DESC;
i have experience but i am new here, we can talk if you ping me . thanks ----------------------------------------------------------------------------------------
Hi I have a good Experience in SQL queries I can do this task in on day With height performance and the shortest way
well, i will explain to you how is going to work, how to achieve that and also training, i need your help to build my portfolio :)
I m experience developer . I can do what you need . you will have to paid me after your work has been done . Thank you