package com.reyun.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.reyun.model.EventtableMetadata;
public interface EventtableMetadataRepository extends JpaRepository<EventtableMetadata, Long> {
	
	
	@Query(value="select distinct bucketid from eventtable_metadata where appkey=?1 and ds >= ?2 and ds <= ?3 and event in ?4",nativeQuery=true)
	List<String> listBuckets(String appkey, String startdate, String enddate, List<String> event);
	
}
