package dmp.repository;

import dmp.model.AppData;
import dmp.model.TagCrawlerAppsWandoujia;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * Created by Administrator on 2017/12/28.
 */
public interface AppDataRepository extends JpaRepository<AppData, Long>
{
    @Query(value="select ad.pkgName,sum(ad.newDevice) as num from AppData ad where ds>=?1 and ds<=?2 group by ad.pkgName",nativeQuery=true)
    List<AppData> findAllByDs(String startDate, String endDate);
}
