İptal Edildi

Writing SQL query

I have the following table in MYSQL database (table doesn't exactly match the example).

ID value Percentage

AA A1 100

AA A2 80

AA A3 80

AA A4 90

AA B1 100

AA B2 55

AA B3 100

AA B4 100

BB A1 100

BB A2 50

BB A3 50

BB A4 90

BB B1 20

BB B2 90

BB B3 90

BB B4 100

I have to output my data set to the following table.

ID A B

The following rules apply

For each ID I have to check the value that starts with A

I have to check percentages of each value that starts with A. If all percentages are >75 and < 100 then I have to write "W/W" in the output table under A.

If one of the percentages is 50 my output will be "W/<the value whose percentage was 50" for A.

If two or the percentages is 50 my output will be "the value whose percentage was 50 / the other value whose percentage was 50".

if one percentage 0 my output will be "the value whose percentage was 0 / the value whose percentage was 0"

All other cases output will be "F/F"

I want a SQL query (that will run in MYSQL) to do the above.

Its a very easy project. Budget around $15-$30.

The program should run on my data set. It should be flexible enough to table more values for sample ID (as long as the value start with the same character).

Beceriler: MySQL, SQL

Daha fazlasını görün: writing rules, writing a check example, w for writing, rules of writing, rules for writing, character writing, bb&t, bb & t, bb t, bb and t, write query, SQL Query, sql mysql, query table, mysql to sql, B3, b2, 2013 query, mysql output table, query project data, writing project database, employees assigned project query sql, output table, mysql query example, project sql query

İşveren Hakkında:
( 52 değerlendirme ) San Diego, United States

Proje NO: #4454154

4 freelancers are bidding on average $35 for this job

devfactoryvw

It is an easy work for me and let us finish it quickly.

1 gün içinde 35$ USD
(24 Değerlendirme)
4.5
html5css3php5

i am ready//

in 0 gün içinde34$ USD
(5 Değerlendirme)
3.3
IgnacioB

Hello. I teach databases at university, its not an easy query, however I can solve it.

in 3 gün içinde35$ USD
(1 Değerlendirme)
2.0
singharun7

i can do it but first we have to chat with each other

in 3 gün içinde35$ USD
(0 Değerlendirme)
0.0