Skip to content

Instantly share code, notes, and snippets.

Stanislava StaniTr

  • Bulgaria
Block or report user

Report or block StaniTr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@StaniTr
StaniTr / Part2
Created Jan 30, 2015
Basic Queries - Records Insight (cnt logon, logoff, id...)
View Part2
--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 Aug 29, 2015
Part1 - Create DB, Create Table, Import Data From CSV
View Part1
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.
View gist:05dce0f4f503fe980e6d
//31
if isdate(
str(DATE(
"31"+"/"+
str(month([Date]))+"/"+
str(year([Date])))
)
)
then
DATE(
View gist:c7a818cbf33fef0a64cf
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;
View gist:ea0fe45c26cf4973937e
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;
View gist:a947c10023cf60121ecf
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;
View gist:56bb3423f1b3ef7a8825
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;
View gist:ad7ef596f15c2ba7ae57
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;
View gist:4eb5cc1718b73b6c398b
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) {
View gist:0809cca28e4283149eaf
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;
You can’t perform that action at this time.