blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 133 | path stringlengths 3 276 | src_encoding stringclasses 33
values | length_bytes int64 23 9.61M | score float64 2.52 5.28 | int_score int64 3 5 | detected_licenses listlengths 0 44 | license_type stringclasses 2
values | text stringlengths 23 9.43M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
cddb2d51a93ed4c8f1da3635b87a9c9d8e9ebfec | SQL | navikt/veilarboppfolging | /src/main/resources/db/migration/V1_5__mal.sql | UTF-8 | 301 | 2.859375 | 3 | [
"MIT"
] | permissive | ALTER TABLE SITUASJON ADD GJELDENDE_MAL NUMBER;
CREATE TABLE MAL (
ID NUMBER NOT NULL,
AKTORID VARCHAR(20) NOT NULL,
MAL VARCHAR(500),
ENDRET_AV VARCHAR(20),
DATO TIMESTAMP,
PRIMARY KEY (ID),
FOREIGN KEY (AKTORID) REFERENCES SITUASJON (AKTORID)
);
CREATE SEQUENCE MAL_SEQ START WITH 1; | true |
df9d976bb7c2457dc92714102d283288650b894d | SQL | drobinson4y/django-djequis | /djequis/adp/sql/CreateDivTable.sql | UTF-8 | 196 | 2.859375 | 3 | [
"MIT"
] | permissive |
CREATE TABLE cx_sandbox:div_table (
div char(4) NOT NULL,
txt char(24),
head_id integer,
active_date date,
inactive_date date
);
CREATE UNIQUE INDEX cx_sandbox:tdiv_div ON div_table (div);
| true |
ac1cf4cb1f050cf509d355cdb5cbdfb0805077ac | SQL | cezarparra/projeto-gamelandia-una | /project-gamelandia-simple/db/DESJAVAGAME_04_11_2018/desjavagame_tb_client_user_permission.sql | UTF-8 | 2,582 | 2.875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: desjavagame
-- ------------------------------------------------------
-- Server version 5.7.22-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS... | true |
dacd0b9bb9b0b3c07bd5f8442d06f0833c9304ce | SQL | Amandeepanmol/HackerRank_SQL | /Asian_Population.sql | UTF-8 | 369 | 3.140625 | 3 | [] | no_license | Asian Population
-------------------
Ist way:
---------
SELECT SUM(P.POPULATION) FROM CITY AS P INNER JOIN COUNTRY AS C ON P.COUNTRYCODE=C.CODE WHERE C.CONTINENT='Asia'; /*using Alice */
IInd way:
----------
SELECT SUM(CITY.POPULATION) FROM CITY,COUNTRY WHERE CITY.COUNTRYCODE=COUNTRY.CODE AND COUNTRY.CONTINENT='As... | true |
1058fad3585ae4d7765492f5678fd821182282a5 | SQL | heiheisoftware/spreader | /spreader-backend/db/old-2012/update-2012-04-23/update.sql | UTF-8 | 1,220 | 3.8125 | 4 | [] | no_license | create table tb_keyword
(
id bigint not null auto_increment,
name varchar(50),
category_id bigint comment 'null未分类,-1无需分类',
tag bit(0) not null default 0 comment '是否是手工建的关键字',
create_time timestamp,
executable bit(0) not nul... | true |
dc9387148839463fd82ecadef404bfc00edadaf2 | SQL | jimmy-wims/monSite | /monsite.sql | UTF-8 | 4,910 | 3.4375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : mar. 13 oct. 2020 à 16:50
-- Version du serveur : 5.7.26
-- Version de PHP : 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... | true |
70f40b2c06bd46a0010428029ca563ebbf45cd48 | SQL | sriyabhat/BootcampX | /0_selects/4_incomple_assignments.sql | UTF-8 | 559 | 4.21875 | 4 | [] | no_license | SELECT (SELECT COUNT(1) FROM assignments) - COUNT(A.id) AS nb_incomplete_submissions
FROM students S
JOIN assignment_submissions A
ON S.id = A.student_id
WHERE S.name = 'Ibrahim Schimme'
SELECT AVG(total_students) as average_students
FROM (SELECT count(students) AS total_students
FROM students
JOIN cohorts on coho... | true |
78ef999b723b4997fcc266e82b0dcda04a1e6d4e | SQL | marielavlz/burger | /db/schema.sql | UTF-8 | 320 | 3.203125 | 3 | [] | no_license | -- Create burgers_db
DROP DATABASE IF EXISTS burgers_db;
CREATE DATABASE burgers_db;
USE burgers_db;
-- Create burgers
CREATE TABLE burgers
(
id INT(10) UNIQUE NOT NULL AUTO_INCREMENT,
burger_name VARCHAR(255) NOT NULL,
devoured BOOLEAN DEFAULT false,
date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id)
);
| true |
1c3a4f8c0e9f1eb9ed9f3ff043ca22711bed8a9c | SQL | liwen666/lw_code | /tempcode/src/main/java/commons/execscript/sql/spf/common/common_220_.sql | GB18030 | 827 | 2.703125 | 3 | [] | no_license | declare
n_count number;
BEGIN
select count(1) into n_count from kpi_t_setinputstep where name = 'żЧ۽' and type = '3' ;
if n_count > 0 then
EXECUTE IMMEDIATE Q'{delete kpi_t_setinputstep where name = 'żЧ۽' and type = '3'}' ;
end if;
E... | true |
ad7dcbdc7b37252c9636cab338efc0e0ade7a6d4 | SQL | 9uilherme/microservice-with-spring-boot | /src/main/resources/data.sql | UTF-8 | 703 | 3.46875 | 3 | [] | no_license |
create sequence if not exists hibernate_sequence start with 1 increment by 1;
create table if not exists user (id integer not null, birth_date timestamp, name varchar(255), primary key (id));
insert into user values (1, sysdate(), 'Zombie');
insert into user values (2, sysdate(), 'The Cranberries');
insert into user... | true |
9fe8590801671b9f3a368032fce735bae8898434 | SQL | avin05/Cricket-team-data-management-system | /bowler.sql | UTF-8 | 749 | 3.25 | 3 | [] | no_license | CREATE DEFINER=`root`@`localhost` PROCEDURE `bowler`()
BEGIN
update final_bowl_stats
set tot_overs = (select sum(overs) from bowler_stats where player_id = final_bowl_stats.player_id),
tot_runs = (select sum(runs) from bowler_stats where player_id = final_bowl_stats.player_id),
tot_dot = (select sum(dots) from bowler_s... | true |
3eae7de26e7276e8fecd68c5e92f77af7105da92 | SQL | bj-/Scripts | /SQL/MS SQL/Systech/Sleep And Strees signals.sql | WINDOWS-1251 | 1,240 | 3.84375 | 4 | [] | no_license | SELECT p.Lastname AS [],
p.firstname AS [],
p.MiddleName AS [],
CONCAT(p.Lastname, ' ', p.firstname, ' ', p.MiddleName) AS []
, DRS.*
from
(
SELECT
ds.[UsersGuid]
-- ,[ServersGuid]
-- ,[VehiclesGuid]
-- ,[SubVehiclesGuid]
-- ,[PlayType]
-- ,[Volume]
-- ,[Duration]
-- ,[Played]
... | true |
bd067fd4c31e6e893af0293f59f6fb30dcdc2be7 | SQL | blackstar58/SQL-queries | /customer_review.sql | UTF-8 | 3,043 | 3.609375 | 4 | [] | no_license | SELECT sum(customer_id)
FROM
ae_indexer_full_today_v2 ldb JOIN
eric_arenas.wpcids cids ON
(ldb.customer_id = cids.wpcid)
WHERE ds = '20170411' and length(ypid)>0 and tier in ('20','21','22')
group by customer_id
select
count(distinct(r.ypid))
from
digdata.... | true |
9269a573051472fbefa32376f3ed047d4eada35e | SQL | thangduong3010/PL-SQL | /opp6code/ch28_code.sql | UTF-8 | 4,314 | 3.546875 | 4 | [] | no_license | /*
Oracle PL/SQL Programming 5th Edition
www.stevenfeuerstein.com/books
Objection creation and example scripts for Chapter 28
You will find below all non-trivial code snippets from the above chapter
that are NOT contained in their own files (as specified in the chapter),
plus any DDL object creation scripts required... | true |
182eddc3d3f69804b0a65d964abeb8a6b2669f59 | SQL | romanus007/dz-na-04.04.2020 | /user1.sql | UTF-8 | 9,611 | 3.359375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Хост: localhost
-- Время создания: Апр 04 2020 г., 10:57
-- Версия сервера: 5.7.27-0ubuntu0.16.04.1
-- Версия PHP: 7.0.33-0ubuntu0.16.04.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00... | true |
d7732bad32bdff124c79f398ff6ec7f0ca4a4748 | SQL | ljq199612/book | /IT/sql反模式/code/Metadata-Tribbles/anti/check-constraint.sql | UTF-8 | 233 | 2.6875 | 3 | [] | no_license | CREATE TABLE Bugs_2009 (
-- other columns
date_reported DATE CHECK (EXTRACT(YEAR FROM date_reported) = 2009)
);
CREATE TABLE Bugs_2010 (
-- other columns
date_reported DATE CHECK (EXTRACT(YEAR FROM date_reported) = 2010)
);
| true |
95d3b327747d6ad08c6aaf5fbc4d9383d3e70fd6 | SQL | serjivanoff/test_task | /src/main/resources/db/initDB_hsql.sql | UTF-8 | 797 | 3.90625 | 4 | [] | no_license | DROP TABLE phones IF EXISTS;
DROP TABLE clients IF EXISTS;
DROP SEQUENCE global_seq IF EXISTS;
CREATE SEQUENCE global_seq AS INTEGER START WITH 1000;
CREATE TABLE clients
(
id INTEGER GENERATED BY DEFAULT AS SEQUENCE GLOBAL_SEQ PRIMARY KEY,
first_name VARCHAR(255) NOT NULL,
middle_name V... | true |
76fae8fb37514df817ff94e061d8baacc1b7c522 | SQL | asamaei/SQL | /Pr1.sql | UTF-8 | 1,805 | 4.21875 | 4 | [] | no_license | #Questions
#Display the employee_id, last name and salary of employees earning in the range of $8000 to $15,000. Sort the output by top salaries first and then by last name.
Select employee_id,last_name,salary from employees where (salary between 8000 and 15000) order by salary,last_name
#Modify previous query (#1... | true |
2f4ea1c97a6cc61e55f14f5cc843ab30bb0d8ca4 | SQL | Pedalves/WebDataTools | /WebCrawler/resources/schema.sql | UTF-8 | 465 | 3.453125 | 3 | [] | no_license | ----------------------------------
-- Web Crawler
----------------------------------
CREATE TABLE IF NOT EXISTS url(
url_input TEXT PRIMARY KEY
);
CREATE TABLE IF NOT EXISTS site(
url_input TEXT,
site_name TEXT,
content TEXT DEFAULT NULL,
parent TEXT DEFAULT ... | true |
e36d86be04142759f7a9b49d6074c333fcfac078 | SQL | jlcchu/GITHUB | /常用SQL/24.临时空间.sql | GB18030 | 1,073 | 3.59375 | 4 | [] | no_license | /*ʹʱռ*/
SELECT S.sid || ',' || S.serial# sid_serial,
S.username,
T.blocks * TBS.block_size / 1024 / 1024 mb_used,
T.tablespace,
T.sqladdr address,
Q.hash_value,
Q.sql_text
FROM v$sort_usage T, v$session S, v$sqlarea Q, dba_tablespaces TBS
WHERE T.session_addr = S.saddr
AN... | true |
010c6ce0eb4b767c5bd88e41ccc2fd16ae1b628a | SQL | chenjs916/zan | /zan.sql | UTF-8 | 986 | 2.703125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : host
Source Server Version : 50525
Source Host : localhost:3306
Source Database : zan
Target Server Type : MYSQL
Target Server Version : 50525
File Encoding : 65001
Date: 2014-06-26 18:13:22
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------... | true |
56fe2d3bf13f3f29a0bd4e28c9fab661c1fa3ddc | SQL | bluelephant72/Managing-Software-Projects-Sprint-1 | /SQL Samples/Create database.sql | UTF-8 | 1,643 | 4.40625 | 4 | [] | no_license | /* This script will create the database used for the ordering system
Note that running this will delete all data in the database!
To run from phpMyAdmin, choose the "SQL" tab at the top */
-- Create the database if it doesn't exist
DROP DATABASE IF EXISTS php_srep_ordering;
CREATE DATABASE php_srep_ordering;
USE php_s... | true |
906ed8e647892e8e78f1c71fb0b2c84bdf223389 | SQL | bhanueve/IITM3 | /dbms/w3_pa_1.sql | UTF-8 | 465 | 3.84375 | 4 | [] | no_license | create view host_teams_new as
select host_team_id, count(*)
from matches
group by host_team_id;
create view guest_teams_new as
select guest_team_id, count(*)
from matches
group by guest_team_id;
create view team_ids as
select host_team_id
from host_teams_new as ht inner join guest_teams_new as gt on ht.host_team_i... | true |
bd1b965df4f05d39b39ba6287e1bcf43885f95c8 | SQL | sid10on10/fastadb-indexer | /schema/Fastadb-Schema-1.0.0-PostgreSQL.sql | UTF-8 | 3,162 | 3.46875 | 3 | [] | no_license | --
-- Created by SQL::Translator::Producer::PostgreSQL
-- Created on Wed Feb 14 13:06:25 2018
--
--
-- Table: division
--
DROP TABLE division CASCADE;
CREATE TABLE division (
division_id bigserial NOT NULL,
division character varying(256) NOT NULL,
PRIMARY KEY (division_id),
CONSTRAINT division_uniq UNIQUE (d... | true |
d50836764036bc56846ae232af3f65864055a666 | SQL | nastyakorotkova/import_transactions | /02-t_dict.sql | UTF-8 | 380 | 2.9375 | 3 | [] | no_license | declare
vn integer := 0;
begin
select count(1) into vn from dual where exists (select 1 from user_objects where object_type = 'TABLE' and object_name = 'T_DICT');
if vn = 0 then
execute immediate '
create table T_DICT
(
keyid INTEGER not null,
dt DATE not null,
amount FLOAT not nu... | true |
e765e1c5551fb5295088c2412b7b625df33a5d97 | SQL | clairblacketer/Phenotype_Data_Acquisition | /ExtractScripts/N3C_extract_V1_0_omop_oracle.sql | UTF-8 | 14,913 | 3.921875 | 4 | [] | no_license | --OMOP v5.3.1 extraction code for N3C
--Written by Kristin Kostka, OHDSI
--Code written for Oracle
--This extract purposefully excludes the following OMOP tables: PERSON, OBSERVATION_PERIOD, VISIT_OCCURRENCE, CONDITION_OCCURRENCE, DRUG_EXPOSURE, PROCEDURE_OCCURRENCE, MEASUREMENT, OBSERVATION, LOCATION, CARE_SITE, PR... | true |
e3347b85d30b83cf03f5d42ccf95dfe5cba0602f | SQL | ANamelessWolf/avalon | /shimazu/documentation/SQL/[10][TABLE]avances.sql | UTF-8 | 852 | 3.140625 | 3 | [
"MIT"
] | permissive | CREATE TABLE IF NOT EXISTS `cdmx_obras`.`avances` (
`clv_avance` INT NOT NULL AUTO_INCREMENT,
`id_captura` INT NOT NULL,
`clv_partida` INT NOT NULL,
`avance_programado` DOUBLE NOT NULL DEFAULT -1,
`avance_fisico` DOUBLE NOT NULL DEFAULT -1,
`avance_financiero` DOUBLE NOT NULL DEFAULT -1,
PRIMARY KEY (`clv... | true |
25766fe244f728bfbe9ad87f6e02df90d06129be | SQL | moonserk/uneftnetgrafautomat | /sql/dp/unbroken_begin.sql | WINDOWS-1251 | 1,191 | 3.25 | 3 | [] | no_license | select
nvl(count(v.well_name),0) AS "",
nvl(sum(v.or_bs),0) AS ""
from fo_hist_oil_day v
where v.REGION_NAME = ' ""'
and trunc(v.dt) = trunc(to_date('##.##.####', 'dd.mm.yyyy'),'mm')
and v.state_rem = ''
and v.dt between trunc(to_date('##.##.####', 'dd.mm.yyyy')-2,'mm') and trunc(to_date('##.##.####', 'dd.mm.yyyy'),'mm... | true |
c914b948294c1284e270d39cb64142104f6690c3 | SQL | jonorton66/sql | /CycleTimes.sql | UTF-8 | 733 | 3.578125 | 4 | [] | no_license | --:CONNECT 192.168.230.228 -U qa -P qa
SELECT DISTINCT AA.PR_Production_Order, AA.PR_Blend_Code, AA.PR_Sec_Out_Prev_Time
FROM sl_PR_Data AA
INNER JOIN
(SELECT DISTINCT PR_Production_Order, MAX(PR_Sec_Out_Prev_Time) AS MaxCycleTime
FROM sl_PR_Data
GROUP BY PR_Production_Order) groupedAA
ON AA.PR_Production_... | true |
8aa52ed7f19a53cc0db8f03bcb150462888a885c | SQL | albrimpaqarizi/PHP-Simple-Project | /mydb.sql | UTF-8 | 4,217 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 01, 2019 at 07:02 PM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
9363ea977f079cdc3fedfff7136c0d21ba8dc26a | SQL | binary-machinery/ochoba_data_mining | /sql/user_queries.sql | UTF-8 | 1,551 | 3.921875 | 4 | [] | no_license | -- user count
select count(*) from users;
-- an amount of "Дерьмак"-like names (local recurring meme)
select count(*) from users
where lower(name) like '%дерьмак%';
-- unique "Дерьмак"-like names
select distinct name from users
where lower(name) like '%дерьмак%';
-- sort by rating
select karma, name, entries_coun... | true |
595174bc89f01fd9606eecc525edeb780e52eb1d | SQL | AkishinoShiame/OpenFreePay | /server/s-services/sql/market.sql | UTF-8 | 458 | 2.765625 | 3 | [] | no_license | DROP TABLE market;
CREATE TABLE market(
order_id int not null primary key AUTO_INCREMENT, #會在我的出價用到
date date not null default now(),
user_id int not null,
src_point_type text not null,
dest_point_type text not null,
revision_times int not null default 0,
src_bid_points double not null,
de... | true |
9ce63e5ee968cdfc307acffa798299e07b91daf7 | SQL | java8-course/sql | /src/main/resources/db/h2/V1__Create_schema.sql | UTF-8 | 1,535 | 3.953125 | 4 | [] | no_license | DROP SCHEMA IF EXISTS test_schema;
CREATE SCHEMA test_schema;
SET SCHEMA test_schema;
CREATE SEQUENCE person_seq START WITH 1000;
CREATE TABLE person (
person_id INTEGER NOT NULL,
first_name VARCHAR(255) NOT NULL,
last_name VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
age INTEGER NOT ... | true |
9cdc736013fb52642a8329c10a8af84f7d190a15 | SQL | codeinmyself/Velocity | /J2EE/src/main/java/xmu/mystore/ordersmgt/zjq/Mapper/create.sql | UTF-8 | 3,436 | 3.125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : mysql6
Source Server Version : 50717
Source Host : localhost:3306
Source Database : mystore
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2017-06-02 13:00:31
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----... | true |
6c08b0889979823effc6a8fccddf82620fd36ae7 | SQL | jzero00/dbSql | /상품관리.sql | UHC | 378 | 2.53125 | 3 | [] | no_license | SELECT prod_id, prod_name, prod_lgu, prod_buyer, prod_cost, prod_price, prod_sale, prod_outline, prod_detail
FROM lprod, prod
WHERE lprod.LPROD_GU = prod.PROD_LGU (+);
SELECT *
FROM prod;
SELECT prod_name
FROM lprod,prod
WHERE lprod_nm = 'ǻǰ'
AND lprod.LPROD_GU = prod.PROD_LGU (+);
... | true |
12fc7ec40427e91e38c8d27beafb9b5fb59cf137 | SQL | lrana-227/RBootCamp | /cw/0-7SQL/20/03-Stu_GregariousAggregates/Unsolved/gregarious_aggregates.sql | UTF-8 | 573 | 3.890625 | 4 | [] | no_license | -- 1. What is the average cost to rent a film in the stores?
SELECT ROUND(AVG(rental_rate),2) as "Average Rental Rate" from film;
-- 2. What is the average rental cost of films by rating? On average, what is the cheapest rating of films to rent? Most expensive?
SELECT RATING, AVG(RENTAL_RATE) AS "AVERAGE Rental/Rating... | true |
4e53fda9b4c33e318c4bf3c2171a361f704afa03 | SQL | iownredport/DatabaseProject | /Project/Patterns/Pattern3.sql | UTF-8 | 462 | 3.96875 | 4 | [] | no_license | select not exists (select count(*),d,j from(
select a.item as d, b.item as j
from sells a, sells b, beers
where a.item != b.item and a.barname = b.barname and (a.price > b.price) and beers.beer = a.item
group by a.item, b.item
union all
select a.item as d, b.item as j
from sells a, sells b, beers
where a.item != b.it... | true |
ba6760dbcfcbd2a4fecc8855fe4b2fce9ea47bae | SQL | aryanugroho/e-commerce | /src/main/resources/script.sql | UTF-8 | 791 | 3.390625 | 3 | [] | no_license | -- ETL
set @cnt = 0;
insert into Atributo
select (@cnt:=@cnt+1) as id, a.nome as valor from atributo a;
set @cnt = 0;
insert into Categoria
select (@cnt:=@cnt+1), c.nome from categoria c order by c.hierarquia;
select (@cnt:=@cnt+1), c.hierarquia from categoria c
where c.hierarquia is not null;
select * from categori... | true |
56265be41d70f877150e936012e96194143e16a7 | SQL | Theuspercy/EsportsManagementSystem | /db/myguests.sql | UTF-8 | 2,370 | 3.109375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 28, 2021 at 04:43 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.4.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
900fdd47304e609ed01930f218af0008bb6b1712 | SQL | lcoln/lt.cncoders.tech.docker | /mysql/sql/init_tag.sql | UTF-8 | 410 | 3.296875 | 3 | [] | no_license | use lt;
CREATE TABLE IF NOT EXISTS `tag` (
`t_id` int NOT NULL AUTO_INCREMENT,
`t_name` varchar(100) COLLATE utf8mb4_general_ci NOT NULL,
`t_create_time` bigint NOT NULL,
`t_update_time` bigint NOT NULL,
`t_delete_time` bigint NOT NULL DEFAULT '0',
PRIMARY KEY (`t_id`),
KEY `tag_t_id_IDX` (`t_id`) USING ... | true |
d281d64ece4c6b5998c32d414dfa96e04bfa0d17 | SQL | TomXD7/TiendaST | /asdasda.sql | UTF-8 | 336 | 3.84375 | 4 | [] | no_license | use northwind;
select a.ProductID, a.ProductName, round(sum((b.Quantity * b.UnitPrice)),2) as Total
from products a, orderdetails b
where a.ProductID = b.ProductID
group by a.ProductID order by Total desc limit 3;
SELECT ProductId, SUM(UnitPrice*Quantity) AS Monto FROM orderdetails GROUP BY ProductId ORDER BY Monto... | true |
2ce6f21226a70e06eb4506d0708ce084f2669222 | SQL | minggow/avarua | /opensource/cronhub/cronhub-web/src/main/webapp/download/cronhub.sql | UTF-8 | 4,636 | 3.53125 | 4 | [
"Apache-2.0"
] | permissive | CREATE TABLE `tb_schedule_user` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`user_id` varchar(50) NOT NULL COMMENT '用户id',
`user_name` varchar(50) NOT NULL COMMENT '用户名',
`user_type` tinyint(2) NOT NULL COMMENT '1:管理员',
`department` varchar(50) NOT NULL DEFAULT '' COMMENT '部门',
`phone` varchar(50... | true |
e93f8df85b9a9d62b58359334003ab760e8af8cf | SQL | dambergautam/firefox-bookmarks | /build/export_query.sql | UTF-8 | 228 | 3.234375 | 3 | [] | no_license | SELECT
a.id, a.parent, a.type, a.title, b.url, b.preview_image_url
FROM
moz_bookmarks AS a LEFT JOIN moz_places AS b ON a.fk = b.id
WHERE
a.title IS NOT NULL AND TRIM(a.title) <> ''
ORDER BY
a.type, a.parent, a.position;
| true |
93c69569f6ca5b72b950dadbb96a7c7dbfefecb9 | SQL | J-T-McC/query-builder | /tests/stubs/seeds/projects.sql | UTF-8 | 1,046 | 2.609375 | 3 | [] | no_license | -- delete vs truncate to accommodate sqlite
DELETE FROM `projects`;
INSERT INTO `projects` VALUES (1, 'Project 1 - user 1', 1);
INSERT INTO `projects` VALUES (2, 'Project 2 - user 1', 1);
INSERT INTO `projects` VALUES (3, 'Project 3 - user 1', 1);
INSERT INTO `projects` VALUES (4, 'Project 4 - user 1', 1);
INSERT IN... | true |
b2a1ef6b4b17d04efa1e1ef12b66028c4dbab2a2 | SQL | molker/CSC3210-GroupProject | /football_db.sql | UTF-8 | 3,193 | 3.484375 | 3 | [] | no_license | # Authors: Matthew Olker, Spencer Peters, Chad Sigmon, Rahul
# Class: CSC3210
# DROP TABLE IF EXISTS `divisions`;
CREATE TABLE `divisions` (
DIV_CODE int(11) NOT NULL UNIQUE,
DIV_NAME varchar(40) NOT NULL,
PRIMARY KEY(DIV_CODE)
);
# Inserts
DROP TABLE IF EXISTS `teams`;
CREATE TABLE `teams` (
TEAM_CODE int(11... | true |
dcc8b038b26ea6e68d2ce9f4e3adc54e00fc18e3 | SQL | leterman/BD | /INSERT.sql | UTF-8 | 1,037 | 2.875 | 3 | [] | no_license | INSERT INTO albums(album_name, year)
VALUES ('Mr. Bad Guy', 1985), ('Happier Than Ever', 2021), ('Revival', 2018), ('Imagine', 1971),
('The One', 1992), ('Tim', 2018), ('Bleach', 1989), ('Horn Concertos', 1953);
INSERT INTO artists(name)
VALUES ('Freddie Mercury'), ('Billie Eilish'), ('Eminem'), ('John Lennon'), ('Elt... | true |
1183662d8b4df39a88da4e12beb8f300d632181d | SQL | brendagutman/data-analyst-job-titles-brendagutman | /Script/DATitles.sql | UTF-8 | 6,277 | 4.59375 | 5 | [] | no_license | -- 1 Q. How many rows are in the data_analyst_jobs table?
-- 1 A. 1793
SELECT count(*)
FROM data_analyst_jobs
-- 2 Q. Write a query to look at just the first 10 rows. What company is associated with the job posting on the 10th row?
-- 2 A. ExxonMobil
SELECT company
FROM data_analyst_jobs
LIMIT 10
-- 3 Q. ... | true |
364f78b95440229799c55b2c44d93bb3c172621d | SQL | katkemper/CS4750-dog-shelter | /dog_shelters.sql | UTF-8 | 52,005 | 3.421875 | 3 | [
"MIT"
] | permissive |
CREATE TABLE potential_adopter(AdopterID int NOT NULL AUTO_INCREMENT,
PRIMARY KEY (AdopterID), first_name VARCHAR(255),
last_name VARCHAR(255),
... | true |
bbd11914523b2c09170f9a89ba68095111e0cacd | SQL | darcyknox/cosc344 | /lab04/q05.sql | UTF-8 | 101 | 2.625 | 3 | [] | no_license | SELECT DISTINCT FNAME, LNAME
FROM employee, works_on
WHERE HOURS < 18 AND ESSN = SSN
ORDER BY FNAME;
| true |
8f345124ce610ddcb3c1e0fe4b1b1f3abd078234 | SQL | saifulsahim/E-Health | /DB/ehealth (3).sql | UTF-8 | 9,486 | 3.078125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 24, 2018 at 03:24 PM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
f8e26a65a2ab0b3ad1bf09aa01d6d1ff1ed4c047 | SQL | daidvrk/graphql-go-postgres | /migrations/1_create_skills_table.up.sql | UTF-8 | 323 | 2.75 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS skills
(
id serial PRIMARY KEY,
category varchar(100) NOT NULL,
name varchar(150) NOT NULL,
exp int NOT NULL,
member_id int NOT NULL
);
INSERT INTO skills
VALUES
('1', 'IT', 'PHP', '7', '1'),
('2', 'IT', 'JAVA', '10', '2'),
('3', 'Design', 'DD', '2', '1... | true |
36bee58ae9937de7716b86a24a785f2a3676d437 | SQL | LaRotta/friendFinder | /app/db/schema.sql | UTF-8 | 1,107 | 3.1875 | 3 | [] | no_license | DROP DATABASE IF EXISTS friends_db;
CREATE DATABASE friends_db;
USE friends_db;
CREATE TABLE friends (
id INTEGER(11) AUTO_INCREMENT NOT NULL,
name VARCHAR(255),
photoImg NVARCHAR(255),
score INTEGER,
PRIMARY KEY (id)
);
INSERT INTO friends (name, photoImg, score) VALUES ("omar cubillos", "https... | true |
3307c563e8ce640e0823e40b892b8332addc8f06 | SQL | teamwhileloop/ucsc-results-center | /sql/trigger_updateOverallGPA.sql | UTF-8 | 2,576 | 3.484375 | 3 | [
"MIT"
] | permissive | DELIMITER //
DROP TRIGGER IF EXISTS `updateOverallGPA`//
CREATE TRIGGER `updateOverallGPA`
BEFORE UPDATE ON `undergraduate`
FOR EACH ROW
BEGIN
DECLARE calculatedGpa FLOAT;
IF (OLD.updated_date = NEW.updated_date) THEN
SET calculatedGpa = (
(coalesce(NEW.y1s1_gpa, 0) * coalesce(NEW.y1s1_cred... | true |
888dad49146d50c019ba4759b536358be05905c0 | SQL | karadsik7/oracle_study | /example/ch02_insert.sql | UHC | 1,208 | 3.578125 | 4 | [] | no_license | create table teacher(
id number primary key,
nickname VARCHAR2(20),
name varchar2(20) not null,
gender char(1) not null
);
desc teacher;
--[insert]
insert into teacher(id, nickname, name, gender) values(1, 'flynn', '嵿', 'm');
select * from teacher;
--ǽ : ڽ ̺ ϼ
insert into teacher(... | true |
8bf562c701dac7d354086019bdd914db57417f68 | SQL | 306529917/ycdemo | /C0-S2-Ply-demo/WebContent/我的课件/1期课程/Oracle/DML基础课堂练习1.sql | UTF-8 | 522 | 2.515625 | 3 | [] | no_license | -- 查询部门名称为 SALES 的部门
-- 查询名字立面带 K 的员工,显示其姓名,工资,入职时间
-- 查询10部门的所有工资小于2000,以及所有的销售员,显示其编号,姓名,主管领导的编号
-- 新增“市场部”,地址“北京”,使用 SEQ_DEMO 的序列生产部门编号
-- 修改“市场部”的地址为“上海”
-- 修改“市场部”的地址为“广州”,完成操作后使用命令撤销该操作
-- 删除“市场部”
| true |
a61a2f8a38cf14a41b51d52f53ec1cd369761b4b | SQL | gpipperr/OraDBASQLScripts | /awr_tablespace_history.sql | UTF-8 | 1,077 | 3.1875 | 3 | [] | no_license | --==============================================================================
-- GPI - Gunther Pippèrr
-- Desc: get the historical Size of a tablespace from the AWR
-- Date: November 2013
--
--==============================================================================
prompt
prompt !!!!You need the Tuning Pack... | true |
c536f9a4940fd52cb58b5d8f9cefe72ef9cf479c | SQL | evillique/ClickHouse | /tests/queries/0_stateless/02187_insert_values_with_mv.sql | UTF-8 | 1,824 | 3.5625 | 4 | [
"Apache-2.0"
] | permissive | CREATE TABLE IF NOT EXISTS a (a Int64) ENGINE=Memory;
CREATE TABLE IF NOT EXISTS b (a Int64) ENGINE=Memory;
CREATE MATERIALIZED VIEW IF NOT EXISTS mv1 TO b AS Select sleepEachRow(0.05) as a FROM a;
CREATE MATERIALIZED VIEW IF NOT EXISTS mv2 TO b AS Select sleepEachRow(0.05) as a FROM a;
CREATE MATERIALIZED VIEW IF NOT ... | true |
58a4899b6ceb48743eb1993df43f388704cda3d3 | SQL | jansforte/oracle | /workshop pl/Data/Ejercicio 8.sql | UTF-8 | 4,451 | 3.796875 | 4 | [
"MIT"
] | permissive | --
--
--JOHAN SEBASTIAN FUENTES ORTEGA
--DATE: 24/04/2021
--
-- ----------------------------------------------------------
/*Paquete de acceso a datos – departamento*/
CREATE OR REPLACE PACKAGE acceso
IS
--retorna los datos del departamento
FUNCTION fGetDept(p_deptno dept.deptno%TYPE)
RETURN dept%ROWTYPE;
--i... | true |
325c94143248ac026f0dad69ea39eb4b04a2eb82 | SQL | regiamariana/JavaScript-FrontEnd | /ex_01/sstop-base/sstop.sql | UTF-8 | 608 | 3.875 | 4 | [
"MIT"
] | permissive | CREATE DATABASE RoteiroSstop;
USE RoteiroSstop;
CREATE TABLE Estilos
(
IdEstilo INT PRIMARY KEY IDENTITY
,Nome VARCHAR(200) NOT NULL UNIQUE
);
CREATE TABLE Artistas
(
IdArtista INT PRIMARY KEY IDENTITY
,Nome VARCHAR(200) UNIQUE
,IdEstilo INT FOREIGN KEY REFERENCES Estilos (IdE... | true |
3f55a32f81fcf8793545f9af84ce79743b9a4992 | SQL | pujui/orderSystem | /backup/ordersystem.sql | UTF-8 | 10,668 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- 主機: localhost
-- 建立日期: 2016 年 10 月 19 日 20:51
-- 伺服器版本: 5.5.52-0ubuntu0.14.04.1
-- PHP 版本: 5.5.9-1ubuntu4.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... | true |
dfd90c952bf494b1d90895dcef6579612b6c4899 | SQL | Rumbie-Mudzie7/SQL-Zoo | /numeric_examples.sql | UTF-8 | 2,431 | 4.53125 | 5 | [
"MIT"
] | permissive | -- 1. Show the the percentage who STRONGLY AGREE.
SELECT
A_STRONGLY_AGREE
FROM
nss
WHERE
question = 'Q01'
AND
institution = 'Edinburgh Napier University'
AND
nss.subject = '(8) Computer Science';
-- 2. Show the institution and subject where the score is at least 100 for question 15.
SELECT
nss.institution, ... | true |
60313c2f51925a47061f6eab2fba926ad54104e2 | SQL | pa-ulander/arbetsprov | /arbetsprov/arbetsprov.sql | UTF-8 | 2,621 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.10.1
-- http://www.phpmyadmin.net
--
-- Värd: localhost
-- Skapad: 24 aug 2012 kl 08:37
-- Serverversion: 5.1.36
-- PHP-version: 5.3.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @... | true |
7d0fc1cdbb9dcb3e7959ef1c4ffc7f1e19ba985a | SQL | magdielmercado/cancino | /base de datos/schema.sql | UTF-8 | 9,517 | 3.40625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 28-11-2017 a las 03:58:13
-- Versión del servidor: 10.1.9-MariaDB
-- Versión de PHP: 5.6.15
DROP DATABASE cancino;
CREATE DATABASE cancino;
USE cancino;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET t... | true |
08d594f63ada524f268df4acc1c17845b7eaff3f | SQL | gabyacg29/BASE-DE-DATOS | /INTRODUCCION BASE DE DATOS_gabriela_cinquemani/BD AGENCIA_VIAJE.sql | UTF-8 | 4,611 | 3.5 | 4 | [] | no_license | -- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI... | true |
e87e366527ac473f36795948f168410e2a9ffdab | SQL | ifsp-slt-old/Controle-de-Agrotoxicos | /doc/Ger.%20Configuracao/BancoDeDados/PRJ2_ctrl_agrotoxicos.sql | UTF-8 | 9,721 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 21-Out-2016 às 15:27
-- Versão do servidor: 5.1.54-community
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_... | true |
5f71d22f939ad0cf807642e21f4e6c3ecda18236 | SQL | whediger/ANSI-SQL-standards | /Recipes/Recipes_Beef_AND_Garlic.sql | UTF-8 | 478 | 3.890625 | 4 | [] | no_license |
SELECT Recipes.RecipeTitle
FROM Recipes
WHERE Recipes.RecipeID
IN (SELECT Recipe_Ingredients.RecipeID
FROM Ingredients
INNER JOIN Recipe_Ingredients
ON Ingredients.IngredientID =
Recipe_Ingredients.IngredientID
WHERE Ingredients.IngredientName = 'Beef'
... | true |
a8e59a586ba994a08cc1e76574f339ff8577f0e1 | SQL | radtek/abs3 | /sql/mmfo/bars/View/v_sdo_autopay_rules.sql | WINDOWS-1251 | 1,403 | 2.796875 | 3 | [] | no_license | create or replace view v_sdo_autopay_rules
as
select r.rule_id,
r.rule_desc,
rf.FIELD_ID,
field_desc,
FIELD_DBNAME_COPR2,
FIELD_OPERATOR,
RULE_TEXT,
FIELD_DBNAME_CL
from sdo_autopay_rules r, sdo_autopay_rules_desc rd, sdo_autopay_rules_fields... | true |
b190da17efcef09b0967118f2ba56fdc32249808 | SQL | IVSEZ/mysqlbis | /_DailyScript/telemetry_livetv_hourlypivot.sql | UTF-8 | 1,979 | 3.6875 | 4 | [] | no_license |
select * from rcbill_my.rep_livetvhourlypivot; -- where sessiondate='2018-08-28';
select * from rcbill_my.rep_livetvhourlystats; -- where resource='SBC';
select *
, year(sessiondate) as SESSIONYR, month(sessiondate) as SESSIONMT, day(sessiondate) as SESSIONDY
, dayname(sessiondate) as SESSIONDAY, monthname(sessiondat... | true |
4d1d2e3908fbe2e3f1846da598dabbf9ae48d92c | SQL | YuanyuWendyMu/EveryDaySQL | /HackerRank/Interviews.sql | UTF-8 | 1,007 | 4.46875 | 4 | [] | no_license | select
con.contest_id,
con.hacker_id,
con.name,
sum(total_submissions),
sum(total_accepted_submissions),
sum(total_views),
sum(total_unique_views)
from Contests con
LEFT JOIN colleges col on con.contest_id = col.contest_id
LEFT JOIN Challenges cha on col.college_id = cha. college_id
LEFT JOIN
(select challe... | true |
284a7fb00874422c0fb9c0b17dd6ac92eaa9c587 | SQL | protosisprov/sisprov_ds | /FDSoil/class/sql/menu/n1_select.sql | UTF-8 | 179 | 3.03125 | 3 | [] | no_license | SELECT m.id, m.id_menu_0, m.titulo, m.ruta FROM seguridad.menu_1 as m
JOIN seguridad.rol_1 r ON m.id=r.id_menu_1 WHERE r.id_rol={fld:id} AND id_status=1 ORDER BY id_menu_0,orden; | true |
72007f0660ed13601741bbed7800f015bb5a950b | SQL | Anderson815/turma19java | /2-Bloco/MySQL/Exercicio-03/Atividade 2.sql | UTF-8 | 1,254 | 3.84375 | 4 | [] | no_license | -- Criação do banco de dados db_ecommerce
create database db_ecommerce
default character set utf8
default collate utf8_general_ci;
-- Entrar no banco de dados
use db_ecommerce;
-- cria a tabela produto
create table tb_produto(
id bigint auto_increment not null,
nome varchar(25) not null,
preco decimal(6, 2)... | true |
f6643f00f392cffc436c16407ab591ef3708d631 | SQL | younggeun0/SSangYoung | /dev/query/date181108_pl/using_update_test_proc.sql | UHC | 738 | 3.125 | 3 | [] | no_license | SELECT * FROM user_procedures;
SELECT * FROM test_proc;
-- ε (ܺ )
VAR msg VARCHAR2(100);
VAR row_cnt NUMBER;
-- ν
EXEC update_test_proc(1112,'',3000,:msg,:row_cnt);
-- ó(ε )
PRINT msg;
PRINT row_cnt;
-- Ȯ
-- , , 븮, , , , ̻,
-- , , ǥ̻簡 Է Ǿ
EXEC update_test_proc(1112,'',3100,:msg,:row_cnt);
PRINT msg;
P... | true |
079a0a15c734b57e5df56c648d56c42152be5832 | SQL | apache/derby | /java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/i18n/LocalizedConnectionAttribute.sql | ISO-8859-1 | 5,744 | 2.78125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unicode",
"LGPL-2.0-or-later",
"CPL-1.0",
"CDDL-1.0",
"MIT",
"LicenseRef-scancode-other-copyleft",
"NAIST-2003",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"CC-BY-SA-3.0",
"LicenseRef-scancode-generic-export-compliance"
] | permissive | --
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License")... | true |
c712a00fca95fbfeea2eee373e751cffbba34a12 | SQL | Thien-Computer/App | /sql/tabel_hanhkhach.sql | UTF-8 | 590 | 3.46875 | 3 | [] | no_license |
drop table if exists ass2.hanhkhach;
create table ass2.hanhkhach(
id_hanhkhach varchar(8) primary key ,
cmnd_cccd varchar(12) unique,
job varchar(50) ,
phone_number varchar(10) unique,
sex varchar(10) ,
email varchar(30) ,
birth date
);
drop trigger if exists ass2.id_hanhkhach;
DELIMITER $$... | true |
da9a7426f095c1cd791c2f3f5a82f3e7c97dab36 | SQL | amit15110003/payearn | /payearn.sql | UTF-8 | 19,762 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jul 28, 2018 at 02:57 PM
-- Server version: 5.7.19
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
b3007fdca1ae6700676250e0cba161cd9479c0f0 | SQL | chengweilin114/Spring_Web | /src/main/webapp/WEB-INF/view/init.sql | UTF-8 | 606 | 3.59375 | 4 | [] | no_license | create table db.category
(
ID int auto_increment
primary key,
BOOK_CLASS varchar(50) not null
)
charset = utf8;
create table db.book
(
ID int auto_increment
primary key,
BOOK_NAME varchar(100) not null,
CATEGORY_ID int not null,
INTRODUCTION me... | true |
70248d67f86426f5d915b5edf319390e09e12246 | SQL | HujjajAli/SocialMediaApp | /SocialMediaApplication/WebContent/socialmedia.sql | UTF-8 | 3,822 | 3.328125 | 3 | [] | no_license | /*
SQLyog Enterprise - MySQL GUI v6.56
MySQL - 5.0.81-community-nt : Database - socialmedia
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
... | true |
8250fcc4de57a98ce302a8ff3baaf6827206c584 | SQL | radtek/Telecommunication | /GSM/DataBase/SCRIPTS_FROM_DB/LONTANA/VIEW/V_TARIFF_VIOLATIONS.SQL | UTF-8 | 1,705 | 3.953125 | 4 | [] | no_license |
CREATE OR REPLACE FORCE VIEW "LONTANA"."V_TARIFF_VIOLATIONS" ("ACCOUNT_ID", "YEAR_MONTH", "PHONE_NUMBER", "CELL_PLAN_CODE", "TARIFF_NAME_FROM_OPERATOR", "TARIFF_CODE", "TARIFF_NAME", "STATUS_CODE", "LAST_CHANGE_STATUS_DATE", "STATUS", "DOP_STATUS_NAME", "DOP_STATUS_DATE") AS
SELECT D.ACCOUNT_ID,
D.YEAR_MON... | true |
dfa34dbc8fcfe26c3a5ad30f2a7de4f5168accf7 | SQL | jisoom/sql | /team4_운영2.sql | UTF-8 | 5,696 | 4.03125 | 4 | [] | no_license | --SELECT A.LEC_OPEN_ID, A.LEC_ST_DATE, A.LEC_END_DATE, A.LEC_ID, A.LEC_PRICE, A.REGI_ST_DATE, A.REGI_END_DATE, A.LEC_STAT_CODE
-- , A.REGI_STAT_CODE, A.TEACHER_ID, A.LEC_CONTENT, B.CODE_NAME || '호' LEC_ROOM_CODE, A.LEC_NAME, C.MEM_NAME TEACHER_NAME
--FROM LEC_OPEN A LEFT JOIN CODE_TB B ON , MEMBER C
--WHERE 1=1
... | true |
95113dc080ba32838fd4dbe46b891f14698dcd12 | SQL | Biswayan375/SQL_Tutorials | /PRACTICE_SQL.sql | UTF-8 | 13,341 | 3.109375 | 3 | [] | no_license | -- PDF Page No.: 2, Ques. No.: 2 (Found a problem. Temporarily incomplete!)
-- player table
create table player(
pid varchar2(3),
pname varchar2(10),
nationality varchar2(10),
position varchar2(10),
age number(3),
primary key(pid)
);
insert into player va... | true |
0f24ae2d3556f5aa564018e017d60cefbe6c48f9 | SQL | jtsato/java-clean-architecture-example | /infra/nosql/src/test/resources/io/github/jtsato/bookstore/infra/book/SearchBooksDataProviderTest.sql | UTF-8 | 1,073 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | INSERT INTO authors (author_id, name, gender, birthdate)
VALUES (1, 'Cay S. Horstmann', 'MALE', '1959-06-16');
INSERT INTO authors (author_id, name, gender, birthdate)
VALUES (2, 'Joshua Bloch', 'MALE', '1961-08-28');
INSERT INTO books (book_id, author_id, title, price, available, creation_date, update_date)
VALUE... | true |
f82c588f4c54a698ad96e10250fa350f224fe255 | SQL | jee4a/jee4a-user-service | /docs/init.sql | UTF-8 | 272 | 2.53125 | 3 | [] | no_license | CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nick_name` varchar(32) DEFAULT NULL,
`phone` varchar(32) DEFAULT NULL,
`status` tinyint(4) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
| true |
6c7625c30497256cbd35c30f4b5a3bc9688c12cc | SQL | debeando/sps | /schema.sql | UTF-8 | 1,145 | 3.640625 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS trash;
CREATE DATABASE IF NOT EXISTS dba;
USE dba;
CREATE TABLE `audits` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`action` enum('I','U','D') NOT NULL,
`database_name` varchar(64) NOT NULL,
`table_name` varchar(64) NOT NULL,
`column_name` varchar(64) NOT NULL,
`primary... | true |
4bba40132b686b7f6f2366a63f3610da7f56a5c9 | SQL | salapimuhamad/UAS | /dump-db_lks-202102261539.sql | UTF-8 | 2,822 | 2.953125 | 3 | [] | no_license | -- MariaDB dump 10.18 Distrib 10.4.17-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: db_lks
-- ------------------------------------------------------
-- Server version 10.4.17-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_... | true |
87ac02bfe0a45ff1cd517d92c725e2b5fa90e9ec | SQL | timothyhoang/databases | /server/schema.sql | UTF-8 | 808 | 3.6875 | 4 | [] | no_license | -- CREATE DATABASE chat;
USE chat;
DROP TABLE IF EXISTS `messages`;
CREATE TABLE `messages` (
`id` INT AUTO_INCREMENT,
`username` INT,
`message` VARCHAR(256),
`roomname` INT,
PRIMARY KEY (`id`)
);
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` INT AUTO_INCREMENT,
`name` VARCHAR(24),
PRIM... | true |
7a27f5b737b90a1c7598c167d6d91770c900afae | SQL | tar98/OldSchoolRepo | /Web/Signup/sql/Pool-Car.sql | UTF-8 | 4,221 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generato il: Apr 09, 2018 alle 03:58
-- Versione del server: 5.5.38-0ubuntu0.14.04.1
-- Versione PHP: 5.5.9-1ubuntu4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... | true |
67f06e5bfdc71c92e71e9833d3b88eb4f328a277 | SQL | sakaiproject/sakai | /msgcntr/messageforums-docs/SAK-11740_oracle.sql | UTF-8 | 637 | 2.78125 | 3 | [
"ECL-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-generic-cla",
"GPL-1.0-or-later"
] | permissive | DROP TABLE MFR_EMAIL_NOTIFICATION_T;
drop sequence MFR_EMAIL_NOTIFICATION_S;
CREATE TABLE "MFR_EMAIL_NOTIFICATION_T"
( "ID" NUMBER(19,0) NOT NULL ENABLE,
"VERSION" NUMBER(10,0) NOT NULL ENABLE,
"USER_ID" VARCHAR2(255 BYTE) NOT NULL ENABLE,
"CONTEXT_ID" VARCHAR2(255 BYTE) NOT NULL ENABLE,... | true |
95f88df2c5e67a1819eaf603a0473f1b6485d0c7 | SQL | MikeOshadami/mini-ebankingsystem | /sql/ebankingproject.sql | UTF-8 | 6,081 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Mar 14, 2018 at 04:01 PM
-- Server version: 5.7.19
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
b4843a86c99423d7e6ae90426153c343d83dfcde | SQL | Alequin/messaege_app_server | /src/sql/tables.sql | UTF-8 | 731 | 3.296875 | 3 | [] | no_license | DROP TABLE IF EXISTS messages;
DROP TABLE IF EXISTS participants;
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS conversations;
CREATE TABLE users(
id SERIAL8 PRIMARY KEY,
name VARCHAR(20),
avatar INT4,
device_system VARCHAR(40),
device_token TEXT,
online_status VARCHAR(20),
is_visible BOOLEAN
);
CREA... | true |
2d8d8cde142ec4cf45ab941b1b6ea6b19a3b085e | SQL | Genskill2/03-bootcamp-sql-rev-sketch | /query2.sql | UTF-8 | 86 | 2.578125 | 3 | [] | no_license | SELECT title,name
FROM books,publisher
WHERE publisher=publisher.id AND country='UK';
| true |
fdc515d90d4f2859c294147238fe975798293a9d | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day19/select1121.sql | UTF-8 | 178 | 2.65625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-18T11:21:00Z' AND timestamp<'2017-11-19T11:21:00Z' AND temperature>=37 AND temperature<=50
| true |
6d51a3baaaefc6f967c0b8b0232aed3dc26d6f9d | SQL | filipeoliveirah/php-default-project | /res/sql/tables/tb_states.sql | UTF-8 | 497 | 3.078125 | 3 | [] | no_license | CREATE TABLE `tb_states` (
`idstate` int(11) NOT NULL AUTO_INCREMENT,
`desstate` varchar(64) NOT NULL,
`desuf` char(2) NOT NULL,
`idcountry` int(11) NOT NULL,
`dtregister` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`idstate`),
KEY `FK_states_countries_idx` (`idcountry`),
CONSTRAINT `FK_s... | true |
3bcfaabe89b6432ae09e47a2ddc44d01505b8570 | SQL | tatiopi/PL-SQL | /DDL/Vistas/views.sql | UTF-8 | 280 | 2.671875 | 3 | [] | no_license | CREATE TABLE VIEW VALO_VISTA AS
SELECT id_eper , cod_tesv , cod_tsev , cod_tval , importe_valo , importe_iva_valo
FROM VALO_VALORES WHERE ID_EPER IN (SELECT ID_EPER FROM EXPL_DESCUADRES);
select * from VALO_VLISTA WHERE FECHA_ULTIMO_VALO > '01/01/2020' ;
DROP VIEW VALO_VISTA ; | true |
a8bc5d085aad5885abb02bb0414a06568e41d3d3 | SQL | elitetheespeon/Espybot | /espybot.sql | UTF-8 | 3,930 | 3.59375 | 4 | [
"MIT"
] | permissive | --
-- Table structure for table `config`
--
DROP TABLE IF EXISTS `config`;
CREATE TABLE `config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`key` varchar(45) CHARACTER SET utf8mb4 NOT NULL,
`value1` text COLLATE utf8mb4_unicode_ci,
`value2` text COLLATE utf8mb4_unicode_ci,
`value3` text COLLATE utf8mb4_unicode_... | true |
02388acf84a04483141ece7376189ea98a190a1f | SQL | Bobstar89/Web-based-Projects | /shopping_planner/Shopping Database/data insertion/insert_button_mapping_data.sql | UTF-8 | 1,339 | 3.046875 | 3 | [
"MIT"
] | permissive | USE Shopping;
DELETE FROM Button_Mapping;
DELETE FROM Button;
DELETE FROM List_Type;
DELETE FROM Associated_View;
ALTER TABLE Button AUTO_INCREMENT = 1;
ALTER TABLE List_Type AUTO_INCREMENT = 1;
ALTER TABLE Associated_View AUTO_INCREMENT = 1;
INSERT INTO Button(name)
VALUE... | true |
f1c98f1f1e0e87f948c70ce4dc0993fb9826c288 | SQL | twan65/springboot-doma2-web | /docker-db/initdb/create_table.sql | UTF-8 | 2,051 | 3.875 | 4 | [] | no_license | SET CHARACTER utf8;
USER infodb;
CREATE TABLE information (
id int NOT NULL AUTO_INCREMENT COMMENT 'お知らせID',
title varchar(30) NOT NULL COMMENT 'タイトル',
overview varchar(300) NOT NULL COMMENT '概要',
display_start_date date NOT NULL COMMENT '掲載開始日',
display_end_date date NOT NULL COMMENT '掲載終了日',
is_delete in... | true |
bd075b040a97237833ea403bc20791d8d570306b | SQL | josf/folkso | /sql/tables/sessions.sql | UTF-8 | 3,360 | 4.03125 | 4 | [] | no_license | drop table if exists oid_urls;
drop table if exists fb_ids;
drop table if exists sessions;
drop table if exists users;
create table users
(userid varchar(255) primary key,
userno integer unsigned auto_increment not null, -- not to be used but mysql wants it
created datetime not null,
last_... | true |
80a7ac16d18147c957434f560a6410a224ec8e7a | SQL | setap/portal | /procedureDb/clobagg_type.sql | UTF-8 | 1,367 | 2.5625 | 3 | [] | no_license | create or replace type clobagg_type as object
(
text clob,
static function ODCIAggregateInitialize(sctx in out clobagg_type) return number,
member function ODCIAggregateIterate(self in out clobagg_type, value in clob) return number,
member function ODCIAggregateTerminate(self in clobagg_type, returnvalue out ... | true |
784f8471a314fd5e4d8b94c062df737d3d18e936 | SQL | lebatuananh/Example-SQL | /6- Where Condition/6.sql | UTF-8 | 478 | 2.84375 | 3 | [] | no_license | USE [C:\DOCUMENTS AND SETTINGS\FABRICE\APPLICATION DATA\LINQPAD\SAMPLES\LINQ IN ACTION\NORTHWND.MDF]
SELECT *
FROM Products
WHERE UnitPrice > 20 OR UnitPrice < 10
ORDER BY UnitPrice DESC
SELECT *
FROM Products
WHERE UnitPrice > 20 AND UnitPrice < 90
ORDER BY UnitPrice DESC
SELECT *
FROM Products
WHERE NOT Discontinu... | true |
594365feddf18a2ac040304828d5db8b80bb4c17 | SQL | sulemankhan447/Scholar-Vision | /newEADB.sql | UTF-8 | 3,262 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4deb1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Oct 07, 2017 at 01:37 AM
-- Server version: 5.7.18-0ubuntu0.16.10.1
-- PHP Version: 7.0.18-0ubuntu0.16.10.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.