İ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.


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: 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


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

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(24 Değerlendirme)

i am ready//

in %bids___i_period_sub_35% gün içinde34%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(5 Değerlendirme)

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

in %bids___i_period_sub_35% gün içinde35%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(1 Yorum)

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

in %bids___i_period_sub_35% gün içinde35%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)