I have a table called program within it are several fields including:
id_program
id_student
how I want to get id_student based on highest id_program volumes of data
let say row in table:-
row 1 : id_program : 1, id_student :001,
row 2 : id_program : 2, id_student :001,
row 3 : id_program : 3, id_student :002,
row 4 : id_program : 4, id_student :001,
row 5 : id_program : 5, id_student :003.
query that i need is it will result like this :-
highest program : 001
Number program : 3
5 1679
I have no idea how you went from your sample data to your results.
I want to get the most id_student create programs
Yes, you've already said that, I don't know what you mean by it.
You can simply Use
Select Id_student as highest_program, Count(Id_student) as Number_program From Your table name
This question belongs to SQL. Anyway, use GROUP BY and COUNT together - SELECT COUNT(id_program) AS prog, id_program, id_student FROM YourTable GROUP BY id_student
Sign in to post your reply or Sign up for a free account.
Similar topics
by: DataFreakFromUtah |
last post by:
Hello!
No question here, just a procedure for the archive.
Search critera:
count records imported count data imported count number of rows
imported
count number of records imported record import...
|
by: ralf321 |
last post by:
Hello!
i want to count elements in xslt.
All with meta=13 contains a AND meta 14 contains b
but it dont work any Idee why?
Thanks.
i try it with
count(object/node/data)
|
by: Geagleeye |
last post by:
Hi.
I need to interpolate som data i have in my tabel.
my tabel looks like this.
Y X
0
0 0,026
0,037
0,003 0,038
0,005 0,064
|
by: arynn |
last post by:
hi.
i have a table name result that contain result from a survey form.
The table have username, a1,a2,a3,a4,a5,a6,.......a75 column which represent username and their answers to each question....
|
by: uprakash14 |
last post by:
i have import excel data in MSflexgrid.. Now i want to count the data for particulars fields...
Like Data have four column A, B, C and D
while using A column, i have to calculate the data of B...
|
by: beacon |
last post by:
Hey everybody,
I'm using 2003 and wondering if there's a way to count the data for multiple sections in a report and summarize it at the end of the section. For instance, I have a report with a...
|
by: mlvander |
last post by:
I would like to be able to sum data in one table and count data in another table with one query. Is this possible ? Below is an example of what I would like to accomplish.
tbl_class
classid |...
|
by: lilbit02 |
last post by:
Hi,
I want to grab data from a .csv file and add all the data to the array. I have the part where I'm grabbing the data from the .csv file but the array issue I haven't totally figured out.
...
|
by: plaguna |
last post by:
I'm trying to Count data in a Query Combining two different fields based on the "Date" the product was sold, and for some reason I get a wrong data. When I use only this expression, It works fine:...
|
by: KLoux |
last post by:
Hello all!
I have a class like this:
class MyClass
{
public:
MyClass(int Count)
{
Data = new double;
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |