Complicated Query

Pettor

Board Regular
Joined
Aug 8, 2015
Messages
175
Dear All good morning,

I am new to databases and I have a question that seems a lot complicated and difficult to me. I have a master table where the first two columns (A&B) have a lot of repeated values and a third column (C) where there are values that are related to the first two columns (an outcome of an experiment).

What I want is to create a new table where there will be four columns, the first will have the values of the column A of the first table and the next three columns will count the values of the column C of the first table again. So, I want to present in different columns the outcomes of the experiments of the values of the column A.

Is it possible?


VALUE AVALUE BVALUE C
ABA
ABB
ABC
ABB
ABC
VALUES ABVALUES CAVALUES CBVALUES CC
A122
B122

<tbody>
</tbody>
 
We now need to start grouping our data in order to create the relevant final report. I have added the type of event as shown.
DateTYPE_OF_EVENTHOME_TEAMAWAY_TEAMHALF_TIME_RESULTFULL_TIME_RESULTHOME_GOALSAWAY_GOALSTOTAL_GOALSOVER_2pt5
01/01/16SERIE ALAZIOROMA1:12:1213Over
01/01/16CHAMPIONS LEAGUEROMAMAN UTD11:011:10111021Over
01/01/16CHAMPIONS LEAGUESTOKE CITYREAL MADRID0:01:0101Under

<tbody>
</tbody>

There would be two summaries: The first incorporating the SEASON and TYPE_OF_EVENT and then a more global summary which captures all data.

Summary1 could look like this:
HOME_TEAMTOTAL_GAMESNO_OF_SCORED_GOALSNO_OF_GOALS_CONCUNDER_2,5 GOALSOVER_2,5_GOALSBOTH_TEAM_SCOREDTYPE_OF_EVENTSEASON
LAZIO38502429915SERIE A2014-15
LAZIO385330221613SERIE A2015-16
LAZIO6124423CHAMPIONS LEAGUE2015-16

<tbody>
</tbody>

with a further Summary2 like this:
HOME_TEAMTOTAL_GAMESNO_OF_SCORED_GOALSNO_OF_GOALS_CONCUNDER_2,5 GOALSOVER_2,5_GOALSBOTH_TEAM_SCORED
LAZIO8211558552731

<tbody>
</tbody>







This is where you need to have an idea of what you actually want in the end. It is important also to note how you are going to present this data. Are you simply going to paste it back (or link it) back to an excel sheet or paper copy / form within Access etc.

If you had an automatic feed (from a website) with the ongoing fixtures you could have an excel file that pulls in that data from a site and vlookup your Access Data to marry the two up.

Do you want to create Summary1 ?

I could with some data to work with (if you have the site or an excel sheet)?




 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
There is also the concern that these summaries are only capturing the data of the team when it plays at Home. What provision is needed for when the team plays Away?

I am assuming that you need both data sets and when selecting your summary of who is playing who then it pulls in the Home data if the team is selected first and Away data for the second team.

If this is the case then we need to introduce an additional column HOME/AWAY
 
Upvote 0
Hi Mistrellis,

Yes there is a provision for the Home/Away distinction and it is rather easy to get the data as the Home team is always mentioned in the, let's say, A column and the Away always in the B column. Both summary approaches is exactly what I should expect from the system.
 
Upvote 0
My point is: If the team is in Column A then use the Home data and if in column B then use the AWAY data. At present we only have Home data in Summary1
 
Upvote 0

Forum statistics

Threads
1,221,825
Messages
6,162,190
Members
451,752
Latest member
majbizzaki

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top