473,320 Members | 1,719 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Need help in retrieving distinct from duplicate column from related column list

2
My data is like Below:

id abc def
---- --------- ------------------------------
1 1.584795 2006-11-04 13:36:06.0
2 1.584795 2006-11-04 14:03:09.0
3 1.584795 2006-11-04 17:42:31.0
4 1.584795 2006-11-05 03:13:23.0
5 1.598802 2006-11-05 08:53:48.0
6 1.598802 2006-11-05 09:25:50.0
7 1.598802 2006-11-05 09:35:49.0
8 1.598802 2006-11-05 12:53:43.0

here columns id, abc, def

i want only rows with id 4, 8. these are latest updated rows in to table based on date. Here column abc is having duplciate values with distinct date/time value.

I appriciate for any help using sql queries. i tried, but am poor in SQL.
can any body pls help me...

Rgds,
sgcool.
Nov 10 '06 #1
1 1493
scripto
143 100+
My data is like Below:

id abc def
---- --------- ------------------------------
1 1.584795 2006-11-04 13:36:06.0
2 1.584795 2006-11-04 14:03:09.0
3 1.584795 2006-11-04 17:42:31.0
4 1.584795 2006-11-05 03:13:23.0
5 1.598802 2006-11-05 08:53:48.0
6 1.598802 2006-11-05 09:25:50.0
7 1.598802 2006-11-05 09:35:49.0
8 1.598802 2006-11-05 12:53:43.0

here columns id, abc, def

i want only rows with id 4, 8. these are latest updated rows in to table based on date. Here column abc is having duplciate values with distinct date/time value.

I appriciate for any help using sql queries. i tried, but am poor in SQL.
can any body pls help me...

Rgds,
sgcool.
based on limited info try this:

select distinct id, abc, max(def) from yourtable
where abc in (1.584795, 1.598802 )
Nov 10 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: frazer | last post by:
hi i have the following 2 typed datasets. 1."SecurityGroupMembership" LoginName GroupId 2."Users"
2
by: JJA | last post by:
Please advise on how to get the GROUP BY coded in an acceptable way: DECLARE @LO INT DECLARE @HI INT DECLARE @StartDate varchar(10) DECLARE @EndDate varchar(10) SELECT @StartDate =...
5
by: Fred Zuckerman | last post by:
Can someone explain the difference between these 2 queries? "Select Distinct id, account, lastname, firstname from table1" and "Select DistinctRow id, account, lastname, firstname from table1" ...
1
by: tHeRoBeRtMiTcHeLL | last post by:
Below is an earlier post to an Excel Group.. ....but I thought that there might be a way to do this in Access by importing data and then creating append and/or update query. I would most certainly...
48
by: phillip.s.powell | last post by:
MySQL 3.23.58 - 4.0.17 (yep, several database server instances, don't ask) I have database Spring with table Students I have database Summer with table Students I am tasked to produce a...
6
by: Bob Stearns | last post by:
I am getting unwanted duplicate rows in my result set, so I added the DISTINCT keyword to my outermost SELECT. My working query then returned the following message: DB2 SQL error: SQLCODE: -214,...
4
by: Mina Patel | last post by:
Hi trying to find the number of duplicate tuples/records in table based on multiple columns ie. select count(distinct list multiple column key ) from x where date = y HAVING ( COUNT(multiple...
1
by: aknoch | last post by:
My basic situation is this - I ONLY want duplicates, so the opposite of DISTINCT: I have two tables. Ordinarily, Table1ColumnA corresponds in a one to one ratio with Table2ColumnB through a...
4
by: omnittha | last post by:
I would like to pull unique records of a SINGLE column but not the other related columns. When I use DISTINCT, it pulls up all the records which are unique across the columns. Here is the code.......
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
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...
0
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...
0
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...
0
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...
1
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....
0
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
0
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...
0
isladogs
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.