Cancelado

Write an SQL Statement

This project is to write a simple SQL statement. The data (and database structure) for the SQL statement is located at [url removed, login to view]

Basically, the SQL statement needs to return the signalid from the tradesignals database. The only variable that is passed in from the outside is the acct_id filed. It needs to have the following criteria:

1. The lowest signalid needs to be found for a given account id where the cmd is less than 6 and the same signalid is not already inserted into the usersignalx table for the given account id and there is no associated signal (found by associating the signalid field in the first record with the assoc_signalid field in the second record) where the cmd in the second record is equal to 6 or 7.

2. The lowest signalid needs to be found where the cmd is 9 and the signalid is not already inserted into the usersignalx table for the given account id.

3. The lowest signalid is found where the cmd = 6, 7, or 8 and there exists a corresponding record (linked by signalid = assoc_signalid) where the record for the assoc_signalid is in the usersignalx for the passed in acct_id. However, if the there exists a cmd = 6 or 7 for the same assoc_signalid, the cmd = 6 or 7 should be returned (lowest of them first is fine).

The lowest of 1, 2 and 3 should be returned in the statement, if possible.

In other words - some of the tradesignals are records on their own, and some later ones are associated to an earlier signalid (based on the assoc_signalid). The goal is to find the lowest standalone one (with a cmd of less than 6) that is not already recorded by the user (thus in the usersignalx) or find the > 6 < 9 signalid records that the user already recorded.

The goal is to write efficient SQL, but if the SQL statements need to be broken up, then that is okay.

Speed is important as well as utilizing the proper keys. Make sure the database structure has the keys defined to optimize the SQL statement. No database or structure modifications should be made (besides key recommendations).

Habilidades: SQL

Ver mais: key data structure, key criteria, find the words and write, sql less than, write com, write some sql for a project, utilizing, sql, sql based, statement structure sql, sql optimize, filed, simple write, simple sql statements, standalone data, simple data structure project, data structure simple project, database broken, data write, sql simple project, standalone database, database table structure, project based sql, simple project sql, signal project

Acerca do Empregador:
( 149 comentários ) Platte City, United States

ID do Projeto: #569521

Premiar a:

crispymasala

Dear Customer, Let's start. Regards, Crispy..

$30 USD em 1 dia
(1 Comentário)
1.8
padang

check pmb for details

$44 USD em 0 dias
(1 Comentário)
2.3

12 freelancers estão ofertando em média $53 para este trabalho

AlosDeveloper

Hello, please see PMB

$60 USD in 0 dias
(28 Comentários)
6.1
templecityteck

Hello, We have 9+ Yrs of experienced in .NET /PHP [url removed, login to view] did 200+ Web /Desktop [url removed, login to view] have 5 yrs Experieced (SQL SERVER) DB [url removed, login to view]

$45 USD em 1 dia
(1 Comentário)
4.8
tomydeveloper

Hello,we are experinced with [url removed, login to view] .Please check pmb for more [url removed, login to view]

$50 USD em 1 dia
(8 Comentários)
4.1
matharpa

I am expert in MQL4, SQL and VB. Check PMB for details.

$50 USD in 0 dias
(13 Comentários)
4.2
oFAZo

Exceptional quality & Quick work. Please refer to Profile & PMB for details. Thanks FAZ

$35 USD in 0 dias
(3 Comentários)
4.2
Naidu0921

Will give you with in hours, i am pretty much confident on giving finetuned SQL statement on your [url removed, login to view] you need me please shoot PM. thx for your time.

$60 USD em 1 dia
(0 Comentários)
0.0
ankitupadhyay

I have been working in SQL and PL/SQL for around 5 yrs. I have strong experience in performance tuning.

$30 USD em 1 dia
(0 Comentários)
0.0
orrfast

Hello Dwmcqueen!! We are SolutionBytes ready to write this statement. We have umpteen programmers and developers in sql. But we need to discuss further so that we could start asap. Please check our profile that will le Mais

$140 USD in 2 dias
(0 Comentários)
0.0
sdinesh

Hi, I can do this job. Have written query for the 2nd one. Have a look. If needed, I can do for the 1 and 2 also...But pls give me the table names,,,all such details. Bid amount: Negotiable. For second one, Mais

$30 USD em 1 dia
(0 Comentários)
0.0
arnygn2009

Hi Can I start working? Read PMB

$60 USD em 1 dia
(0 Comentários)
0.0