Skip to content

Instantly share code, notes, and snippets.

View StaniTr's full-sized avatar

Stanislava StaniTr

  • Bulgaria
View GitHub Profile
@StaniTr
StaniTr / Part2
Created January 30, 2015 12:23
Basic Queries - Records Insight (cnt logon, logoff, id...)
--all records: 17403
Select count(actionname) as allLogs
from puzzSessions;
--logOFF: 8687
Select count(ActionName) as cntLOFF
from puzzSessions
where ActionName='LOGOFF';
--logON: 8716
Select count(ActionName) as cntLOFF
from puzzSessions
@StaniTr
StaniTr / Part1
Last active August 29, 2015 14:14
Part1 - Create DB, Create Table, Import Data From CSV
USE master
CREATE DATABASE sqlPuzzleSessions
ON
--The model database is used as the template for all databases created on an instance of SQL Server.
/*Primary data file - contains the startup information for the database; points to the other files in the database.
User data and objects can be stored in this file or in secondary data files.
Every database has one primary data file. (.mdf)*/
-- Because MAXSIZE is not specified, the files can grow to fill all available disk space.
//31
if isdate(
str(DATE(
"31"+"/"+
str(month([Date]))+"/"+
str(year([Date])))
)
)
then
DATE(
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Exam_Problem2_AddingAngles {
public static void main(String[] args) {
import java.util.Scanner;
public class Exam_Problem1_DozenEggs {
public static void main(String[] args) {
//keeps num of eggs
int eggs=0;
//keeps num of dozens;