/** * @param args * @throws Exception */ public static void main(String[] args) throws Exception { // TODO Auto-generated method stub // System.out.println(HibernateSessionFactory.getSession().toString()); char ch[] = new char[26]; String arr[] = new String[25]; int j = 0; for (int i = 97; i < 98 + 25; i++) { ch[j] = (char) i;
j++; } for (int i = 1; i <= 2; i++) { File f = new File("D:/群发用户/邮件群发用户--" + new SimpleDateFormat("yyyy-MM-dd").format(new Date()) + "--" + i + ".txt"); f.createNewFile(); FileOutputStream out = new FileOutputStream(f); OutputStreamWriter w = new OutputStreamWriter(out); if (i == 1) {
w.write("domain:aiwow.cc" + "\r\n"); for (int k = 1; k <= 25; k++) { String str = ""; for (int r = 1; r <= 5; r++) { int index = (int) (Math.random() * 25); str += ch[index]; } arr[k - 1] = str; w.write(str + ",123456,爱我网" + "\r\n");
1 select * from User where useid not in(select userid from Article); 2 select title from article inner join vote on article.articleid=vote.aritcleid and vote.score>100 order by vote.score asc; 3有点不太会,下面胡乱乱写了一通
3 select * from user where userid in(select userid from Article inner join vote on article.articleid = vote.articleid group by userId having avg(score)>100) group by userid having count(*) >5;