diff --git a/src/Database/Tempodb/Types.hs b/src/Database/Tempodb/Types.hs
--- a/src/Database/Tempodb/Types.hs
+++ b/src/Database/Tempodb/Types.hs
@@ -84,11 +84,14 @@
     parseJSON = withText "ByteString" $ pure . encodeUtf8
     {-# INLINE parseJSON #-}
 
-data Num a => Data a = Data
+data Data a = Data
     { uid       :: Maybe IdOrKey
     , timestamp :: Maybe TempoDBTime
     , value     :: a
-    } deriving (Show, Eq, Ord)
+    } deriving (Show, Eq)
+
+instance Ord a => Ord (Data a) where
+    compare (Data _ t _) (Data _ t' _) = t `compare` t'
 
 data Bulk a = Bulk
     { timestmp   :: TempoDBTime
diff --git a/tempodb.cabal b/tempodb.cabal
--- a/tempodb.cabal
+++ b/tempodb.cabal
@@ -1,5 +1,5 @@
 name:                tempodb
-version:             0.2.2.3
+version:             0.2.2.4
 synopsis:            A small Haskell wrapper around the TempoDB api.
 
 description:         TempoDB is a time-series database as-a-service with a
