Multiple group-by functions in one recordset or linking two recordsets

This is a discussion on Multiple group-by functions in one recordset or linking two recordsets within the MySQL Database forums, part of the Database Forums category; Is there a way to create multiple group by functions to generate different variable within just one recordset. What i ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-30-2007
chris_huh
 
Posts: n/a
Default Multiple group-by functions in one recordset or linking two recordsets

Is there a way to create multiple group by functions to generate
different variable within just one recordset. What i have is a load of
data on different species. I need to be able to count how many
different species there are (using COUNT(DISTINCT)) and how many
individuals of each species there are. So i need to have one variable
that is calculated from grouping them by species (as well as habitat,
date and replica) and another that is grouped by just habitat, date
and replica to calculate the number of different species there are.

I also need to display the different species with their counts
alongside which would either mean it will need to be in the same
recordset and make some sort of nested repeat region or have two
recordsets that are linked. Can you link two recordsets together like
that?

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:30 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0