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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
6e70c34d7e4438bf943d5441898ff839a531dba9 | SQL | nikola5rovic/backendApp | /sql/backend_app.sql | UTF-8 | 2,258 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Feb 22, 2021 at 07:37 PM
-- Server version: 5.7.26
-- PHP Version: 7.2.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
af2e81559f312ddc85cf7240946a6b8b23df63e3 | SQL | perrym75/access-analysis-ws | /src/main/resources/sql/mssql/access_right/selectResourceAccessViaUserAccount.sql | UTF-8 | 603 | 3.734375 | 4 | [] | no_license | SELECT
DISTINCT
ar.ACCESS_RIGHT_ID,
ar.DISPLAY_NAME
FROM
[RESOURCE] res
INNER JOIN
ACCESS_ENTRY ae
ON
ae.RESOURCE_ID = res.RESOURCE_ID
INNER JOIN
ACCESS_RIGHT ar
ON
ae.ACCESS_RIGHT_ID = ar.ACCESS_RIGHT_ID
INNER JOIN
T_SP tsp
ON
ae.SECURITY_PRINCIPAL_ID = tsp.PARENT_ID
... | true |
bae00a39d221df254ac73e02be18116073d560fc | SQL | MZqk/boco | /SQL/mod/1111.sql | UTF-8 | 652 | 3.015625 | 3 | [] | no_license | select a.scan_start_time,c.region_name,b.name ,b.cgi,NbrMeanEstab_1,NbrPktUl_1,NbrPktDl_1,NbrPktLossUl_1,NbrPktLossDl_1
from tpa_eutrancell_ne a,tcc_eutrancell b,region_city c
where a.scan_start_time >=to_date('2017-06-24 00:00:00', 'yyyy-mm-dd hh24:mi:ss')
and a.scan_start_time <=to_date('2017-06-24 23:00:00', ... | true |
f40d09cb07da2e8f3f53a6b8aa7715c0afcf8255 | SQL | joseedgardo2000/hackerrank | /SQL/BasicJoin/query02.sql | UTF-8 | 120 | 3.375 | 3 | [] | no_license | SELECT city.name
FROM country
INNER JOIN city
ON country.code = city.countrycode
WHERE continent = 'Africa'; | true |
30345a6aba434280f1974cca46671e8952aa3040 | SQL | Bonsen/2015-2016-Infomation-Security | /2016/simple(no spark)/sql.sql | UTF-8 | 18,773 | 2.625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.10
-- http://www.phpmyadmin.net
--
-- Host: localhost:8889
-- Generation Time: Aug 10, 2016 at 02:30 PM
-- Server version: 5.5.42
-- PHP Version: 5.6.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `simple`
--
-- -----------------------------... | true |
0bd89e30fb43c654373ce76778439dd4bcd2a7b3 | SQL | 1241545483/terrace-cloud | /sql/20181224-counts-ddl.sql | UTF-8 | 598 | 3.296875 | 3 | [] | no_license | DROP TABLE IF EXISTS media_counts;
CREATE TABLE media_counts
(
rec_id VARCHAR(30) NOT NULL COMMENT '主键',
media_id VARCHAR(30) NOT NULL COMMENT '被播放ID',
media_type VARCHAR(30) NOT NULL COMMENT '播放类型',
clicked VARCHAR(10) COMMENT '点击音频,未播放完成',
finished VARCHAR(10) COMMENT '音频播放完成',
create... | true |
aafeeccd31e3c9c6ac0893bb1a27743817879eab | SQL | rlawjdgnsdle/GMS_MODEL2 | /src/pool/gms.sql | UTF-8 | 412 | 3.09375 | 3 | [] | no_license | select * from member;
UPDATE MEMBER
SET
TEAM_ID = 'BTEAM',
ROLL = 'leader' ,
AGE = '26' ,
password = '1'
WHERE MEM_NAME like '지은';
,'지은','준','재경','단아'
select * from Project_TEAM;
UPDATE PROJECT_TEAM SET TEAM_ID = 'DTEAM'
WHERE TEAM_NAME LIKE '어벤저스';
UPDATE MEMBER SET TEAM_ID = 'ATEAM', ROLL = 'l... | true |
8e50edad97151cf9ee1f239f09d5531b11d6e9bd | SQL | adegbola/SuperHero | /Superheros.sql | UTF-8 | 4,407 | 3.4375 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Wed Jul 19 20:06:59 2017
-- Model: New Model Version: 1.0
-- 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='TR... | true |
8e1eecdb78bca63f68cd5e66fba289bffdc1c1bb | SQL | existentialcoder/narrated-diffs | /server/migrations/002_add_users.sql | UTF-8 | 214 | 2.78125 | 3 | [] | no_license | create table users
(
id bigserial primary key,
github_id bigint not null,
github_username varchar(39) not null,
github_token varchar(100) not null,
constraint unq_github_id unique (github_id)
)
| true |
d8f3f9e283316d033d6abeea8a50d76d0174a70c | SQL | GersanCabo/bae_gersan | /Tema 6/6.9.sql | UTF-8 | 3,217 | 4.21875 | 4 | [] | no_license | DROP DATABASE IF EXISTS empresa;
CREATE DATABASE IF NOT EXISTS empresa;
USE empresa;
/*
1. Borramos las tablas si existen y procedemos a crearlas.
*/
DROP TABLE IF EXISTS clientes, provincias;
CREATE TABLE clientes (
codigo INT UNSIGNED NOT NULL AUTO_INCREMENT,
nombre VARCHAR(30) NOT NULL,
domicilio VARCH... | true |
08a972cf5b2293169cde0bb56d288f933c3cf4ca | SQL | vijaydairyf/TimelyFish | /SolomonApp/dbo/Views/dbo.vCFPigSaleDetailUNION.sql | UTF-8 | 2,066 | 2.75 | 3 | [] | no_license |
--*************************************************************
-- Purpose:Pig Sale Account Detail
--
-- Author: Charity Anderson
-- Date: 7/18/2005
-- Usage: EssBase vCFPigSaleEssbase
-- Parms: None
--*************************************************************
CREATE VIEW vCFPigSaleDetailUNION
AS
Select RefNbr,... | true |
528fe102392ccd28d4bdf963b99dde84c40bad08 | SQL | markarsanious/Schools_Website | /Databases/update.sql | UTF-8 | 2,354 | 3.984375 | 4 | [] | no_license | use School_Network;
Drop PROCEDURE acceptOrReject;
delimiter //
CREATE PROCEDURE acceptOrReject(school_nameProc VARCHAR(50),child_ssnProc VARCHAR(50),
verdict TINYINT)
BEGIN
UPDATE Parents_apply_for_Schools P SET P.accepted=verdict
WHERE P.school_name=school_nameProc and P... | true |
5f451ccc77506bfdebdcaf90eef4adbda91d2e14 | SQL | shadowfox/caldav-tool | /schema_sqlite3.sql | UTF-8 | 221 | 2.609375 | 3 | [] | no_license | CREATE TABLE account (
id TEXT PRIMARY KEY,
server_uri TEXT NOT NULL,
username TEXT,
password TEXT
);
CREATE TABLE calendar (
id TEXT PRIMARY KEY,
account_id TEXT NOT NULL,
name TEXT NOT NULL,
uri TEXT NOT NULL
) | true |
17a885a4997d226ec97ed72f7912b5327e1aa9c0 | SQL | likhithakishore/edX_Data_Science | /Querying with Transact SQL/Lab1.sql | UTF-8 | 953 | 3.78125 | 4 | [] | no_license | --challenge 1
SELECT *
FROM SalesLT.Customer;
SELECT Title, FirstName,MiddleName, Lastname, Suffix
FROM SalesLT.Customer;
SELECT Salesperson, Title + ' ' + LastName AS CustomerName, Phone
FROM SalesLT.Customer;
--challenge 2
SELECT CAST(CustomerID AS varchar) + ': ' + CompanyName AS CustomerCompany
FROM ... | true |
07f92979d613ea016f48846c620345c85e265145 | SQL | danieldiamond/gitlab-analytics | /transform/snowflake-dbt/models/bamboohr/xf/employee_directory.sql | UTF-8 | 2,897 | 4.0625 | 4 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | WITH bamboohr_directory AS (
SELECT *
FROM {{ ref ('bamboohr_directory') }}
), department_info as (
SELECT employee_id,
last_value(job_title) RESPECT NULLS
OVER ( PARTITION BY employee_id ORDER BY job_id ) AS last_job_title,
last_value(reports_to) RESPECT NULLS
... | true |
36434d4681fafb98a4edaa01c6b28117cf57d702 | SQL | greut/cs322 | /queries/basic_k.sql | UTF-8 | 471 | 4.375 | 4 | [] | no_license | -- List the last and first name of the players who played for a Chicago team
-- and Houston team.
SELECT DISTINCT
p.id, firstname, lastname
FROM
player_seasons ps
JOIN teams t ON
ps.team_id = t.id AND
t.city LIKE 'Houston'
JOIN player_seasons ps2 ON ps2.person_id = ps.person_id
JOIN... | true |
2271c09227cc44409c028dc86711bc9007047981 | SQL | joaoAndradeJr/MySql-One-For-All | /desafio3.sql | UTF-8 | 272 | 3.3125 | 3 | [] | no_license | CREATE VIEW historico_reproducao_usuarios AS
SELECT u.`name` AS usuario, s.`name` AS nome FROM SpotifyClone.user AS u
INNER JOIN SpotifyClone.listened_song AS ls
ON u.user_id = ls.user_id
INNER JOIN SpotifyClone.song AS s
ON ls.song_id = s.song_id
ORDER BY usuario, nome;
| true |
4b1f52f4409a5a6cfeafe9fb7b6dba585c167602 | SQL | vijayshekh04/Bookstore | /database/bookstores.sql | UTF-8 | 10,425 | 3.015625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 16, 2020 at 09:01 AM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
2d9e61937d37f53a385cc329d7940e953594eb88 | SQL | CSharp-Databases-MS-SQL-Server/03.Table-Relations | /02. One-To-Many Relationship.sql | UTF-8 | 819 | 3.71875 | 4 | [] | no_license | --02. One-To-Many Relationship
CREATE TABLE Manufacturers
(
ManufacturerID INT IDENTITY PRIMARY KEY,
[Name] VARCHAR(30) NOT NULL,
EstablishedOn DATETIME NOT NULL
)
SET IDENTITY_INSERT Manufacturers ON
INSERT INTO Manufacturers(ManufacturerID, Name, EstablishedOn) VALUES
(1, 'BMW', '07/03/1916'),
(2, ... | true |
fa65f992c3a5c6a0a9295e639ba475d7a99ac05c | SQL | iamfarghali/CRUD-System-Using-OOP | /database/products.sql | UTF-8 | 354 | 3.015625 | 3 | [
"MIT"
] | permissive | -- Table Structure for table `products`
CREATE TABLE IF NOT EXISTS `products` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(40) NOT NULL,
`description` text NOT NULL,
`price` decimal(7,2) NOT NULL,
`category_id` int(11) NOT NULL,
`created` datetime NOT NULL,
`modified` timestamp NOT NULL DEFAULT CURREN... | true |
ec88cdf1f6a8e8d22dc137ef0c83f0215169c39f | SQL | BamindaGeek/API_REST_CAMP | /.idea/dataSources/5445b7b6-fc7d-4528-be7e-2fefcd9dda55/storage_v2/_staging_/schema/campagne_bd.w_EoeQ/routine/ps_AffectationMission.juZwoQ.sql | UTF-8 | 1,875 | 3.390625 | 3 | [] | no_license | create
definer = root@localhost procedure ps_AffectationMission(IN _affectationMissionId varchar(36),
IN _missionId varchar(36), IN _membreId varchar(36),
IN _createdBy varchar(36), IN _action v... | true |
a46c299bf5f94f52c30722a0ac7423a407458624 | SQL | zhuzio/sugeAicao | /aicao.sql | UTF-8 | 8,993 | 2.90625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : yuyulu
Source Server Version : 50718
Source Host : localhost:3306
Source Database : aicao
Target Server Type : MYSQL
Target Server Version : 50718
File Encoding : 65001
Date: 2017-10-16 11:44:20
*/
SET FOREIGN_KEY_CHECKS=0;
-- ------... | true |
2ff5d8e183031a822a61cd0043e4d514cbf99c04 | SQL | thangduong3010/PL-SQL | /EODA/scripts/ch15/demo05.sql | UTF-8 | 1,415 | 3.59375 | 4 | [] | no_license | -- Reading and Filtering Compressed Files in a Directory Tree, search_dir.bsh
host mkdir /tmp/base
host mkdir /tmp/base/base2a
host mkdir /tmp/base/base2b
host echo 'base col1,base col2' | gzip > /tmp/base/filebase.csv.gz
host echo 'base2a col1,base2a col2' | gzip > /tmp/base/base2a/filebase2a.csv.gz
host echo 'base2... | true |
662976d6f919627db42977efa19d7ab0d8b4c1e0 | SQL | Fly-Rock/spring-clean-oaup | /document/product.sql | UTF-8 | 16,567 | 3.484375 | 3 | [] | no_license | # CREATE DATABASE IF NOT EXISTS oaup_db DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
DROP TABLE IF EXISTS `product_category`;
CREATE TABLE `product_category` (
`category_id` INT(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键、自增',
`category_name` varchar(50) NOT NULL DEFAULT '' COMMENT '商品分类名称',
`category_al... | true |
f675eecd76bd250144c34c8ce09c30143e08deac | SQL | sbmorvant/EPBI414 | /EPBI414/Week 6/sql_e414_f2016_A6_P1.sql | UTF-8 | 2,750 | 4.34375 | 4 | [] | no_license | -- +--------------------------------+
-- | |
-- | EPBI414 HW6 pt1 SQL |
-- | sql_e414_f2016_A6_P1.sql |
-- | |
-- | Author: Stephen Morvant II |
-- | swm38@case.edu |
-- | |
-- +----... | true |
c80d6498d16b7199312ffca225cc5be4147ac0ac | SQL | juxtamor/fiestaloca | /fiestaloca.sql | UTF-8 | 5,073 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Client: localhost
-- Généré le: Lun 27 Février 2017 à 09:58
-- Version du serveur: 5.5.53-0ubuntu0.14.04.1
-- Version de PHP: 5.5.9-1ubuntu4.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER... | true |
1bcb3fa8522d0bb8ae20fbe10bbaaa93c8fa4f05 | SQL | joshspringer/RecipePlanner | /sql/recipe_count_by_ingredient.sql | UTF-8 | 222 | 3.859375 | 4 | [] | no_license | SELECT
i.name,
count(ri.recipe_id) as recipe_count
from
ingredients i JOIN recipe_ingredients ri ON i.id = ri.ingredient_id JOIN recipes r ON ri.recipe_id = r.id
where i.name like ('%lamb%')
GROUP BY 1
ORDER BY 2 DESC
| true |
4f48f48559a4699e8120e2b8886ecb531d96e2b1 | SQL | AndrewDrought/petClinic | /src/main/resources/db/mysql/data.sql | UTF-8 | 1,271 | 2.5625 | 3 | [] | no_license | INSERT IGNORE INTO vets VALUES (1, 'Alex', 'Yevchenko');
INSERT IGNORE INTO vets VALUES (2, 'Helen', 'Boyko');
INSERT IGNORE INTO vets VALUES (3, 'Victoria', 'Boyko');
INSERT IGNORE INTO vets VALUES (4, 'Roman', 'Kondrash');
INSERT IGNORE INTO vets VALUES (5, 'Andrew', 'Fok');
INSERT IGNORE INTO vets VALUES (6, 'Alexan... | true |
82f35f3f392583b63d5219774304012eda939d6a | SQL | kazimuth/locale-list | /data/az/locales.mysql.sql | UTF-8 | 42,071 | 2.65625 | 3 | [
"MIT"
] | permissive | CREATE TABLE list (id VARCHAR(2) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
INSERT INTO `list` (`id`, `value`) VALUES ('af', 'afrikaans');
INSERT INTO `list` (`id`, `value`) VALUES ('af_ZA', 'afrikaans (Cənub Afrika)');
INSERT INTO `list` ... | true |
2204c05ec759317a6ca2cd80887f06db95ccd9b8 | SQL | satriyoadhy/rekam-medis-web | /application/helpers/rekam-medis.mysql.withusr.sql | UTF-8 | 2,989 | 3.03125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Aug 19, 2019 at 01:34 AM
-- Server version: 10.1.41-MariaDB-0ubuntu0.18.04.1
-- PHP Version: 7.2.19-0ubuntu0.18.04.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET... | true |
4dedadab53e0f0169e9165bf916a9dcdf8abb9fb | SQL | presian/HomeWorks | /Databases/5.AdvancedSQL/problem17.sql | UTF-8 | 262 | 3.578125 | 4 | [] | no_license | --Problem 17. Write a SQL statement to create a table Groups.
--Groups should have unique name (use unique constraint).
--Define primary key and identity column.
CREATE TABLE Groups(
GroupID int IDENTITY PRIMARY KEY,
Name nvarchar(50) UNIQUE NOT NULL)
| true |
1257d8ec367709e1ad72a4fc932eca9871459484 | SQL | ChristopherBass/KInspector | /KInspector.Modules/Scripts/ScreenshotterModule-v9.sql | UTF-8 | 301 | 2.9375 | 3 | [
"MIT"
] | permissive | SELECT NodeGUID
FROM View_CMS_Tree_Joined
WHERE
ClassName != 'cms.file'
AND ClassName != 'cms.folder'
AND DocumentCanBePublished = 1
AND (DocumentPublishFrom IS NULL OR DocumentPublishFrom <= GETDATE())
AND (DocumentPublishTo IS NULL OR "DocumentPublishTo" >= GETDATE())
ORDER BY DocumentNamePath | true |
45b25748fda88a0b7decb1347c2cd9e22735bf89 | SQL | sanei-dengyo-jyoho/SQL-Server | /内線管理/請求売上一覧_Qリスト.sql | UTF-8 | 1,134 | 3.484375 | 3 | [] | no_license | with
v0 as
(
select
a0.*
from
入金回収_Qリスト as a0
union all
select
b0.*
from
請求売上_Q未請求リスト as b0
)
select
*
,
CONCAT(
dbo.FuncMakeConstructOrdered(
CONCAT(工事種別名,N'#'),
取引先略称
),
CASE
WHEN ISNULL([JV出資比率],N'') < >N''
THEN CONCAT(SPACE(2),[JV出資比率])
ELSE N''
END
)
as [発注先JVグループ]... | true |
864b9f793304186851037741d25d63f17f79968f | SQL | JustinVEspinoza/Tienda | /BD_Tienda.sql | UTF-8 | 3,148 | 2.6875 | 3 | [] | no_license | Create database Tienda;
use Tienda;
insert into Products values(null,'Pantalla LCD','Es un buen producto','100000',20,0,'http://localhost/Tienda/Image/Products/default.png',2);
insert into Products values(null,'Pantalla HP','Es un buen producto','100000',20,0,'http://localhost/Tienda/Image/Products/default.png',1);
i... | true |
047829681d07409057ed2f1471be084334e013d7 | SQL | Saltfarmer/Simple-Employee-Database-Interface | /database/pulepayung.sql | UTF-8 | 1,978 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 18, 2018 at 04:36 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
c0f8d74c90b9815f3f0582192d3a23d2d2a4cb77 | SQL | andytanoko/4.2.x_integration | /PDIPBaseServices/Worklist/sqlscripts/create-tables.sql | UTF-8 | 922 | 2.9375 | 3 | [] | no_license | USE userdb;
#
# Table structure for table 'worklistvalue'
#
DROP TABLE IF EXISTS worklistvalue;
CREATE TABLE `worklistvalue` (
`UID` bigint(11) NOT NULL default '0',
`wi_description` varchar(50) default NULL,
`wi_comments` varchar(50) default NULL,
`wi_status` char(2) default NULL,
`wi_cdate` date default N... | true |
dc895f30dff434dabb007161a57a5af12feb836c | SQL | dardan0118/MYSQL-BASIC | /2-Select/taak04/antwoorden.sql | UTF-8 | 1,121 | 3.359375 | 3 | [] | no_license | -- Opdracht 1
SELECT max(wage) AS hoogste_loon_speler_fc_utrecht FROM `players` WHERE `club` = 'fc utrecht'
-- Opdracht 2
SELECT `name`, AVG(wage) AS gemiddeldeloon, ROUND(AVG(wage)) FROM `players` WHERE `club` = 'fc utrecht'
-- Opdracht 3
SELECT sum(wage) as alle_lonen FROM `players` WHERE `club`= 'fc groningen'
-- ... | true |
2755e376dc6a827dc120d15ede60cc5ef209ed62 | SQL | nishacodes/assessment2_sinatra | /mysql/wizards.sql | UTF-8 | 3,651 | 4.75 | 5 | [] | no_license | -- Create a database called wizards. The rest of the assesment all will take place in the wizards db.
-- Create a table called wizards with the following columns (name, age).
CREATE TABLE wizards(
id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT,
name text,
age integer);
-- Write a statement to count the number of rows... | true |
468cb83fc90330052e0f2537b7017a33ff09ae18 | SQL | kellya/pygmy | /pygmy/sql/create_apppermission_table.sql | UTF-8 | 296 | 2.984375 | 3 | [] | no_license | -- :name create_apppermission_table
CREATE TABLE "appPermission" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"owner" INTEGER,
"permission" INTEGER,
FOREIGN KEY(owner) REFERENCES owner(id),
FOREIGN KEY(permission) REFERENCES permission(id)
);
| true |
5cc98cf8032d8dda58a3e9b96e3d005b9dcc6a1a | SQL | vikasjena/SQL | /paydb/scoring_model_stat_by_sessions.sql | UTF-8 | 1,234 | 3.78125 | 4 | [] | no_license | SET @Date = '2014-10-27 19:00:00';
select
FROM_UNIXTIME(cs.date_start),
cs.result,
cs.shop_id,
scoring_model_log.flag_blocked,
scoring_model_log.model_out,
users.quality,
cs.credit_id,
cs.phone,
DATEDIFF(FROM_UNIXTIME(cs.date_start), (select _VAL from (SELECT
paydb.extra_score_values.credit_session_i... | true |
9bebf7c2395cec91662aeeafa689162282d1c29d | SQL | madhavsuresh/KloakDB | /sql/table_defs.sql | UTF-8 | 3,634 | 3.125 | 3 | [] | no_license | -- experimental config
CREATE TABLE demographics (
patient_id integer,
birth_year integer,
gender integer,
race integer,
ethnicity integer,
insurance integer,
zip integer);
CREATE TABLE diagnoses (
patient_id integer NOT NULL,
site integer NOT NULL,
year in... | true |
df4fe09e7779c04648882de2edd68f3e4e02145b | SQL | kltang96/CSIT337-DrinksOnUs.lol | /group_project337.sql | UTF-8 | 11,972 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 17, 2018 at 05:35 AM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
bd6106f112faaa42ac3d10dba2c3d36b4f5f7e63 | SQL | adavis2010/sql-scripts | /Sub query example 99.sql | UTF-8 | 65 | 2.703125 | 3 | [] | no_license | Select * from Student
Where GPA > (select avg(GPA) from Student); | true |
25834cae294ad24cb4231b7654d4f72a3e48b33a | SQL | naynadya/sqlplsqlpracticalsrepo | /Payroll.sql | UTF-8 | 12,307 | 3.703125 | 4 | [] | no_license | create table Associate(
associateId number ,
firstName varchar2(50) not null,
lastName varchar2(50) not null,
yearlyInvestmentUnder80C number,
department varchar2(50) not null,
designation varchar2(50)not null,
pancard varchar2(50)not null,
emailId varchar2(50) not null
)
-----------... | true |
4aa166b5042b2afed180b567e39a8e1f615cf195 | SQL | keakaka/sql-practice | /mysql/practice 01.sql | UTF-8 | 945 | 3.796875 | 4 | [] | no_license | -- 1
select concat(first_name, ' ', last_name) name from employees where emp_no = 10944;
-- 2
select concat(first_name, ' ', last_name) 이름, gender 성별, hire_date 입사일 from employees order by 2;
-- 3
select
distinct (select count(*) from employees where gender = 'F') 여직원,
(select count(*) from employees where gender = ... | true |
84f2031c9513a232affa1bf453b4c31cc4bfbe52 | SQL | infosys-hpcc/ECLBuilder | /src/main/resources/scripts.sql | UTF-8 | 1,034 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | CREATE DATABASE IF NOT EXISTS hpccbuilder;
USE hpccbuilder;
DROP TABLE IF EXISTS eclbuilderuser;
CREATE TABLE eclbuilderuser (
userIndex int(11) NOT NULL DEFAULT '0',
userid varchar(45) DEFAULT NULL,
password varchar(45) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS ecl... | true |
59f3564d46518d9f8299bc099e771c4947c21c41 | SQL | felipe-8847/generation | /mysql/atividade2.sql | UTF-8 | 990 | 3.234375 | 3 | [] | no_license | create database ecommerce;
use ecommerce;
create table tb_produto(
id bigint auto_increment,
nome varchar(60) not null,
preco double not null,
descricao varchar(200) not null,
ativo boolean not null,
quantidade int not null,
primary key (id)
)
insert into tb_produto(nome, preco, descricao, a... | true |
ac9e5e2f75b16278dac61895c4e9a1f6d5a71a5d | SQL | davidlambourdiere/tp-architecture-web | /src/main/resources/db/migration/V1.0.3__add_room.sql | UTF-8 | 868 | 3.015625 | 3 | [] | no_license | CREATE TABLE lifetech.room (
id SERIAL PRIMARY KEY,
optlock TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
num VARCHAR(255)
);
ALTER TABLE lifetech.light ADD COLUMN room_id BIGINT UNSIGNED NOT NULL;
ALTER TABLE lifetech.light
ADD CONSTRAINT FK_light_room_id FOREIGN KEY (room_id) REFERENCES lifetech.room(id);
A... | true |
b8da1153131b92b275245cf036a882b49a30dc25 | SQL | nss-day-cohort-46/chinook-sllittrell | /exercises/18-23/sales_agent_customer_count.sql | UTF-8 | 162 | 3.5625 | 4 | [] | no_license | SELECT e.FirstName || e.LastName Employee , Count(c. CustomerId) Customers FROM Customer c
JOIN Employee e ON e.EmployeeId = c.SupportRepId
GROUP BY e.EmployeeId | true |
a34acb241e4a7a3b6d2ca88b7990ee6543a9edbf | SQL | crispab/signup | /conf/evolutions/default/13.sql | UTF-8 | 463 | 2.65625 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] | permissive | # --- First database schema
# --- For heroku deployment - use PostgreSQL - see http://www.postgresql.org/
# --- Must also work with H2 - test locally
# ---
# --- Password is 'admin'
# --- !Ups
INSERT INTO users (id, first_name, last_name, comment, email, phone, permission, pwd)
VALUES (- 6, 'Admin', 'Istratör', 'Ad... | true |
9bb59f2a1ae0030c2535de1d6d4c2493923c8fd4 | SQL | IonutParaschiv/booking | /sql/bachelor.sql | UTF-8 | 6,543 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 02, 2015 at 06:29 PM
-- Server version: 5.6.16
-- PHP Version: 5.5.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
a989b576c8ee0139bee2c89ad6f8ee1d3f806180 | SQL | peipei1109/P_07_leetcode | /mysql/sqls.sql | UTF-8 | 1,270 | 4.125 | 4 | [] | no_license | --
CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT
BEGIN
RETURN (
# Write your MySQL query statement below.
SELECT e1.Salary
FROM (SELECT DISTINCT Salary FROM Employee) e1
WHERE (SELECT COUNT(*) FROM (SELECT DISTINCT Salary FROM Employee) e2 WHERE e2.Salary > e1.Salary) = N - ... | true |
e21bc0186bccd3b544a8b1e01beb86c29f990ab3 | SQL | Mahitha-Maddi/Retail-Store-Database-Management | /Views.sql | UTF-8 | 2,733 | 4.5 | 4 | [] | no_license |
CREATE VIEW [Stores With Highest Sales] AS
SELECT TOP 5 s.StoreID, s.StoreName, sum(i.BillingAmount) as [Total Sales]
FROM Stores s inner join Invoice i on s.StoreID=i.StoreID
Where i.PaymentDate between '2020-11-01' AND '2020-11-30'
Group by s.StoreID, s.StoreName
Order by [Total Sales] DESC;
DROP VIEW [St... | true |
0854822e4688c933d1d08a9a9db134e9b213993d | SQL | nss-evening-cohort-3/learning-sql-individual-assignment-guthb | /SQL_Learing_Thru_Doing_Question_10.sql | UTF-8 | 208 | 3.140625 | 3 | [] | no_license | --Looking at the InvoiceLine table, provide a query that COUNTs the number of line items for Invoice ID 37.
use Chinook;
SELECT COUNT(InvoiceId) AS 'Line Item Tally' FROM InvoiceLine WHERE InvoiceID = 37;
| true |
3e6491d95a85a09e5514f43f0084cdcbbfbb2ea9 | SQL | kamyu104/LeetCode-Solutions | /MySQL/leetcodify-friends-recommendations.sql | UTF-8 | 720 | 4.15625 | 4 | [
"MIT"
] | permissive | # Time: O(n^2)
# Space: O(n^2)
WITH recommend_cte
AS (SELECT DISTINCT a.user_id user_id,
b.user_id recommended_id
FROM listens a
INNER JOIN listens b ON a.user_id != b.user_id AND a.day = b.day AND a.song_id = b.song_id
GROUP BY a.user_id,
... | true |
0066c127ac066e5bdb844f56a261c28d25172e24 | SQL | wanghaisheng/fhirbase | /test/fhirbase_jsonbext_spec.sql | UTF-8 | 1,626 | 2.5625 | 3 | [
"MIT"
] | permissive | -- #import ../src/tests.sql
-- #import ../src/fhirbase_json.sql
fhirbase_json._is_array('[1,2]'::jsonb) => true
fhirbase_json._is_array('"a"'::jsonb) => false
fhirbase_json.json_get_in('{"a": 1}'::jsonb, ARRAY['a', 'b']) => ARRAY[]::jsonb[]
fhirbase_json._is_array('[{"a":"b"}]'::jsonb) => true
fhirbase_json._is_a... | true |
6f3b195e6376cb61b23e52d16e2925f452a58776 | SQL | penicillin0/SQL-from-zero | /sqledi2_Sample/Sample/Ch09/9_3/List9_5.sql | SHIFT_JIS | 1,445 | 3.5 | 4 | [] | no_license | /* List9-5 Shohine[u쐬SQL */
--f[^x[Xshop̍쐬
CREATE DATABASE shop;
--u\qvpsqlOAEgAēxR}hvvgshopf[^x[XڑBpostgres̃pX[h̓CXg[Ɏw肵
C:\PostgreSQL\9.5\bin\psql.exe -U postgres -d shop
--Shohine[u̍쐬
CREATE TABLE Shohin
(shohin_id CHAR(4) NOT NULL,
shohin_mei VARCHAR(100) NOT NULL,
shohin_bunrui VARCHAR(32) NOT NULL... | true |
eb228bb07ae7f5830054762e8f515fb2d35471de | SQL | LaserPewPew10/Employee-Tracker | /db/seed.sql | UTF-8 | 670 | 3.515625 | 4 | [] | no_license | INSERT INTO department (name)
VALUES ('Sales'), ('Engineering'),('HR');
INSERT INTO roles (title, salary, department_id)
VALUES ('Sales Lead', 110000, 1), ('Sales Person', 70000, 1), ('Senior Engineer', 160000, 2), ('Software Engineer', 100000,2), ('Senior HR', 90000, 3), ('HR Correspondent', 80000, 3 );
INSERT INTO ... | true |
d4e52e7188f3bffe425af5a9d1caa20e4126aa1f | SQL | dennyalfath/letex-garmindo | /letex-garmindo.sql | UTF-8 | 9,339 | 3.09375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 10, 2020 at 03:31 AM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
33378d7e1e549fb62a0c5f28f8e79a88eac33c85 | SQL | vbogudskyi/warehouse | /docs/vbohudskyi/script/patch_3.sql | UTF-8 | 553 | 2.9375 | 3 | [] | no_license | ALTER TABLE SignIn
ALTER COLUMN COOKIE varchar(15) NOT NULL;
ALTER TABLE SignIn
ADD CONSTRAINT uq_cookie UNIQUE(COOKIE); --Msg 2714, Level 16, State 5, Line 1
--There is already an object named 'uq_cookie' in the database.
EXEC sp_helpconstraint SignIn;
ALTER TABLE SignIn
DROP CONSTRAINT DF__SignIn__COOKIE_... | true |
da4597951dfd5f4018fd3b0e53d5198e669b680d | SQL | rbosco/controle-estoque-php-react | /sql/estoque.sql | UTF-8 | 4,870 | 3.40625 | 3 | [
"MIT"
] | permissive | -- --------------------------------------------------------
-- Servidor: localhost
-- Versão do servidor: 5.7.24 - MySQL Community Server (GPL)
-- OS do Servidor: Win64
-- HeidiSQL Versão: 9.5.0.5332
-- --------------------------------------------------------
/*... | true |
78bad92a9d287095f885d58bbd08ea1295c909af | SQL | knivit/education | /ebank/sql_init.sql | UTF-8 | 2,036 | 3.453125 | 3 | [] | no_license | -- Init script
create table Department (
DepartmentId int not null primary key,
Name varchar(64) not null
);
create table Employee (
EmployeeId int not null primary key,
DepartmentId int not null references Department(DepartmentId),
ChiefId int null references Employee(EmployeeID),
Name ... | true |
8e7638485bd0335e791cb1f72be6ab926e536613 | SQL | AJTootell/WebScript3 | /server/init.sql | UTF-8 | 1,195 | 3.5625 | 4 | [] | no_license | create database if not exists template;
drop table if exists template.layoutWidget;
drop table if exists template.layout;
drop table if exists template.widget;
create table if not exists template.layout (
lay_id int not null auto_increment primary key,
lay_name varchar(30),
lay_imageBack boolean not null,
lay... | true |
8e671af131c453ed842f3fbc03e04d15d8b86924 | SQL | ppedvAG/SQL-Admin-Powerwoche-Mai-2021-VC | /SQL Admin Powerwoche/Leistungsindikatoren.sql | WINDOWS-1252 | 3,421 | 3.53125 | 4 | [] | no_license | Prozessor\% Prozessorzeit berwachung des CPU-Verbrauchs auf dem Server
Logischer Datentrger\Freie MB berwachung des freien Speicherplatzes auf den
Datentrgern
MSSQL$Instance:Datenbanken\Gre der
Datendateien (KB) Wachstumstrend im Laufe der Zeit
Arbeitsspeicher\Seiten/s berprfung auf Auslagerungen, ein starker Hinweis
... | true |
505ecd3fdfa69d6deac20aa1ae2d32ad7698cb1f | SQL | endeavourhealth-discovery/DiscoveryQueryLibrary | /Projects/LBHAdultSocialCareLinkage/Queries/populateLsoaLookup.sql | UTF-8 | 4,171 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | USE data_extracts;
-- ahui 3/3/2020
DROP PROCEDURE IF EXISTS populateLsoaLookup;
DELIMITER //
CREATE PROCEDURE populateLsoaLookup()
BEGIN
DROP TABLE IF EXISTS lsoa_lookup;
CREATE TABLE lsoa_lookup (
code VARCHAR(10),
location VARCHAR(100)
);
ALTER TABLE lsoa_lookup ADD INDEX lsoa_idx (code);
INSERT INT... | true |
6dae8a234efb24759909331fe00ef363450c21ad | SQL | joshuaeveleth/sedmap | /liquibase_files/changelog2_Indexes.sql | UTF-8 | 2,325 | 2.828125 | 3 | [] | no_license | --liquibase formatted sql
--This is for the sedmap schema
--changeset duselman:CreateDaIndex
CREATE INDEX "SEDMAP"."SITE_REF_DA_IDX" ON "SEDMAP"."SITE_REF" ("NWISDA1");
--rollback Drop index SITE_REF_DA_IDX;
--changeset duselman:CreateStateIndex
CREATE INDEX "SEDMAP"."SITE_REF_STATE_IDX" ON "SEDMAP"."SITE_REF" (... | true |
ac3a5c109acdf981ccb6f2d65ac2bea3f9be7f9f | SQL | mildrock/kurui-doc | /sql/agent.sql | UTF-8 | 272 | 2.78125 | 3 | [] | no_license | select t.*, t.rowid from agent t;
select count(*) as allCount from agent t where 1=1 and t.status=1;
select t.type,count(*)/50 from agent t where t.status=1 group by t.type order by t.type
select t.type,count() from agent t where t.status=1 order by t.type
| true |
12a8be68a9c66d7f2627cf13a1122c18abbcac23 | SQL | rocket-science-inc/roqet-server | /src/main/resources/db/migration/V3__users.sql | UTF-8 | 986 | 2.703125 | 3 | [] | no_license | DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` INT(10) NOT NULL AUTO_INCREMENT,
`first_name` VARCHAR(255) NOT NULL,
`last_name` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id`));
INSERT INTO user ( id, first_name, last_name) VALUES ( 1, 'James', 'Smith');
INSERT INTO user ( id, first_name, last_name) VALUE... | true |
0bfbb527e362e985f1e3e720a207e7b237d91daf | SQL | YauheniD/GodelDataMasteryPart1 | /Tasks/Maksim/Task4/query09.sql | UTF-8 | 184 | 2.96875 | 3 | [] | no_license | --Query 9
SELECT CustomerID,
year,
TotalQty,
SUM(TotalQty) OVER (PARTITION BY CustomerID ORDER BY year) runqty
FROM Sales.vCustOrders
ORDER BY CustomerID, year;
;
| true |
01ab3d6fb503e7f79a6f7862dab1317e40ff14f7 | SQL | chuma1409/waiter_webapp | /tables.sql | UTF-8 | 1,638 | 3.453125 | 3 | [] | no_license | create table users(
id serial not null primary key,
username text
);
create table days(
id serial not null primary key,
chosen_day text not null
);
create table availability(
id serial not null primary key,
id_user int not null,
id_days int not null,
FOREIGN KEY(id_user) REFERENCES us... | true |
5917b01cea28c1a80d0d3228fe943f9c157c8f60 | SQL | tecnificados/boot | /scripts/incidencia.sql | UTF-8 | 390 | 2.84375 | 3 | [
"Apache-2.0"
] | permissive |
--
-- Estructura de tabla para la tabla `incidencia`
--
CREATE TABLE `incidencia` (
`id` int(11) NOT NULL,
`titulo` varchar(255) DEFAULT NULL,
`descripcion` varchar(2000) DEFAULT NULL,
`estado` int(20) NOT NULL,
`autor` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indices de la tabl... | true |
3c52aaa86cd64ac34ee854f92093a9bbf0982eda | SQL | gauniyalmohit/onlineAttendancePortal | /at.sql | UTF-8 | 16,173 | 2.578125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 10, 2017 at 06:35 AM
-- Server version: 5.1.41
-- PHP Version: 5.3.1
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_S... | true |
04bc007e93e7c61362394cd2b3155982c499e1ff | SQL | subratcall/VJOracle | /Grid_Control_queries.sql | UTF-8 | 4,405 | 3.59375 | 4 | [] | no_license | --Grid Control Queries
--list All Database Target details monitored thru grid
select t.host_name
as host
, ip.property_value IP
, t.target_name
as name
, decode ( t.type_qualifier4
, ' '
, 'Normal'
, t.type_qualifier4 )
as type
, dbv.property_value
as version
, port.prope... | true |
33bd5f7fc298619ad38fc6122a0de4f551fd4fe0 | SQL | maxaeon/mySqlMini | /query.sql | UTF-8 | 197 | 3.265625 | 3 | [] | no_license | -- created movies.movie_name
-- created reviews.review
SELECT movies.movie_name AS movie, reviews.review
FROM reviews
RIGHT JOIN movies
ON reviews.movie_id = movies.id
ORDER BY movies.movie_name;
| true |
31b4d281bb08c4c915588b75d1214dd301e7621f | SQL | khiaxeng/cs2102-project-team53 | /individual_files/schema/noel_schema.sql | UTF-8 | 3,386 | 4.5 | 4 | [] | no_license | DROP TABLE IF EXISTS Employees, Junior, Booker, Senior, Manager, Contacts, HealthDeclaration, Departments, MeetingRooms, Sessions, Updates, Joins CASCADE;
CREATE TABLE Departments (
did INT PRIMARY KEY,
dname VARCHAR(50)
);
-- dept_id is included in employees and set to NOT NULL to enforce total part constraints. ... | true |
665fbada2769cc0bcce9ffcbc8e8d8edf1ce10a7 | SQL | xpos/schema | /xpos.sql | UTF-8 | 12,559 | 2.90625 | 3 | [] | no_license | -- MySQL dump 10.11
--
-- Host: localhost Database: xpos
-- ------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/... | true |
fcf58f2b9a50ec8bc969e5a7f286baec975f3d33 | SQL | Blackbaud-BharatYadav/fenxt-npi-dev | /SQL/10_out_ProjectBalance.sql | UTF-8 | 616 | 2.640625 | 3 | [] | no_license | INSERT INTO _sys_transform_id (id,entity,ts_start,ts_end) VALUES (${TRANSFORM_ID['TRANSFORM_ID']},'dm_ProjectBalance',now(),null);
insert /*+ direct */ into out_ProjectBalance
select
${TRANSFORM_ID['TRANSFORM_ID']} as _sys_transform_id,
"TenantId",
"ProjectBalanceId",
"FiscalPeriodId",
"ProjectId",
"Balan... | true |
eafbc20bfb87dcfed42a5b44ba2e3e7aca4e083a | SQL | nicksimmons53/School | /cs3743/assignments/3/Script/createMovie.sql | UTF-8 | 369 | 2.625 | 3 | [] | no_license | -- createMovie.sql
drop table if exists Movie;
CREATE TABLE `Movie` (
`movieId` char(9) NOT NULL,
`title` varchar(31) NOT NULL,
`genre` varchar(11) DEFAULT 'UNKNOWN',
`rating` varchar(4) DEFAULT 'PG',
`minutes` int(4) DEFAULT 0,
`releaseDt` date ... | true |
e5a590496e187e25252d65f42f03958db85dffeb | SQL | CloudsSea/caterecommend | /src/main/resources/dbscript/init/businessRelateTable.sql | UTF-8 | 15,429 | 3.15625 | 3 | [] | no_license | DROP TABLE
IF EXISTS `business`;
CREATE TABLE `business` (
`business_id` VARCHAR (22) NOT NULL COMMENT '商户id',
`business_id_int` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '商户id(bigint)',
`city` VARCHAR (64) DEFAULT '' COMMENT '城市',
`full_address` VARCHAR (128) DEFAULT '0' COMMENT '完整地址',
`latitude` VARCHAR (24) ... | true |
ed35c57cfb237e3778dc2e2fda1e4090e4f85288 | SQL | jlmc/hibernate-tunings | /database-migrations/migration/V29__batching-of-write-operations.sql | UTF-8 | 1,380 | 3.84375 | 4 | [
"MIT"
] | permissive | create schema if not exists multimedia;
drop table if exists multimedia.review cascade;
drop table if exists multimedia.book_author cascade;
drop table if exists multimedia.author cascade;
drop table if exists multimedia.book cascade;
drop sequence if exists multimedia.author_10_seq;
drop sequence if exists multimedia... | true |
f8b607f996b6ce93f5e34ce2b5f9ebf97883c8ca | SQL | ericmess/HW10-SQL | /SQL_HW.sql | UTF-8 | 7,861 | 4.5 | 4 | [] | no_license | USE sakila;
-- 1a. Display the first and last names of all actors from the table `actor`.
SELECT first_name, last_name FROM actor;
-- 1b. Display the first and last name of each actor in a single column in upper
-- case letters. Name the column `Actor Name`.
ALTER TABLE actor ADD COLUMN `Actor Name` VARCHAR(50);
UPDA... | true |
aaf99e57133e7b5ab5f71055961e3da9c48d932e | SQL | Gangadharb54/test2 | /apartment/tables/century_notice.sql | UTF-8 | 1,930 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 18, 2016 at 08:53 AM
-- Server version: 5.6.20
-- PHP Version: 5.5.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
883f17b4a81b3bc1cbbc48c347c106bc315f3645 | SQL | sql-boot/postgres-health-scripts | /sql/extension.sql | UTF-8 | 339 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | /*{
"name": "extension",
"title": "Extensions",
"description": "Extensions",
"tags": "ui"
}*/
select ae.name
, installed_version
, default_version
, case when installed_version <> default_version then 'OLD' end as is_old
from pg_extension e
join pg_available_extensions ae on extname = ae.name... | true |
42e3549914bc7fb417af4cb85ddd3cb02acbbdbf | SQL | karlarao/scripts | /perf_quickstart/testcase_adw.sql | UTF-8 | 1,718 | 3.03125 | 3 | [] | no_license |
--### SECTION 1: BEGIN CLOCK TIME
select to_char(sysdate, 'YY/MM/DD HH24:MI:SS') AS "START" from dual;
col time1 new_value time1
col time2 new_value time2
select to_char(sysdate, 'SSSSS') time1 from dual;
--### SECTION 2 (OPTIONAL): INCREASE SESSION ARRAYSIZE, TERM OUTPUT OFF
-- set arraysize 5000
set te... | true |
9758c6ee8ffc56d9edf347dce693484de767cf2f | SQL | ematsushita/BootcampX | /4_queries/assistance_requests_data.sql | UTF-8 | 392 | 3.859375 | 4 | [] | no_license | SELECT teachers.name as teacher, students.name as student, assignments.name as assignment, (assistance_requests.completed_at - assistance_requests.started_at) as duration
FROM teachers
JOIN assistance_requests ON teachers.id = assistance_requests.teacher_id
JOIN students ON assistance_requests.student_id = students.id ... | true |
774c9fdfb3bec1df11d66ea6a2c1c4b38ff6f5a2 | SQL | nirali420/wikimap | /db/seeds/00_wikiseeds.sql | UTF-8 | 6,892 | 2.53125 | 3 | [] | no_license | --Users
INSERT INTO users
(id, username, password)
VALUES
(DEFAULT, 'aaronjames', 'password');
INSERT INTO users
(id, username, password)
VALUES
(DEFAULT, 'alexwalker', 'password');
INSERT INTO users
(id, username, password)
VALUES
(DEFAULT, 'baileywhite', 'password');
INSERT INTO users
(id, username, password)
... | true |
fcf3b3526190fc8a5c87af62f0846634afa68709 | SQL | briandcase/OOPproject | /project command/1STUFF/1Insert Into Stuff Table.sql | UTF-8 | 1,606 | 2.546875 | 3 | [] | no_license | ---ADD STUFF TO STUFF TABLE
INSERT INTO Staff (staff_id, S_FName, S_LName, S_sex, S_Dob, S_Address, S_Contact, S_Title, S_salary)
VALUES ('S100', 'Trinity', 'Yang', 'M', '1979-11-01', '8387 West Blackburn St.
Montclair, NJ 07042','(630) 446-8851','Recpetionist', 8769);
INSERT INTO Staff (staff_id, S_FName, S_LName,... | true |
a150b677e4779c69f1f3c1ecc3b1be9d6ee501e8 | SQL | radtek/abs3 | /sql/mmfo/bars/View/n00_don3.sql | UTF-8 | 2,499 | 2.84375 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/View/N00_DON3.sql =========*** Run *** =====
PROMPT =====================================================================================
PROMPT *** Create view N00_... | true |
304ce8fbd50de158da9cb22ce98f8f86316abfbb | SQL | pees17/oophp-v5 | /sql/content/setup.sql | UTF-8 | 3,129 | 3.75 | 4 | [
"MIT"
] | permissive | --
-- Setup for the article:
-- https://dbwebb.se/kunskap/lagra-innehall-i-databas-for-webbsidor-och-bloggposter-v2
--
--
-- Create the database with a testuser
--
-- CREATE DATABASE IF NOT EXISTS oophp;
-- GRANT ALL ON oophp.* TO user@localhost IDENTIFIED BY "pass";
-- USE oophp;
-- Ensure UTF8 as chacrter encoding ... | true |
cb0c55dba8b07a523d9f51b4c54a8b244e69fa22 | SQL | aajjbb/luarocks-site | /schema.sql | UTF-8 | 26,929 | 3 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgs... | true |
11c10b6e52725df420f3391bc8b3ce0251f46f26 | SQL | avacabillan/SQL-DATA-SOURCE | /GROUPBY.sql | UTF-8 | 91 | 2.671875 | 3 | [] | no_license | SELECT SUM(list_price), product_id FROM products WHERE model_year =2018 GROUP BY brand_id;
| true |
9272f39136447b08673cb110b0138af7e342e2b2 | SQL | chuyeow/pubstorm-server | /apiserver/migrations/0002_create_oauth_clients.up.sql | UTF-8 | 931 | 3.234375 | 3 | [] | no_license | CREATE TABLE oauth_clients (
id bigserial PRIMARY KEY NOT NULL,
client_id character varying(255) DEFAULT encode(gen_random_bytes(16), 'hex') NOT NULL,
client_secret character varying(255) DEFAULT encode(gen_random_bytes(64), 'hex') NOT NULL,
email character varying(255) DEFAULT '' NOT NULL,
name character v... | true |
f39f52ef396390599cf8d1451cdab9cc77e7e794 | SQL | alan-turing-institute/DSSG19-DNCP-PUBLIC | /sql/descriptive_statistics/mariaaran_EDA_complaints_amendments.sql | UTF-8 | 12,406 | 4.25 | 4 | [
"MIT"
] | permissive | --------------------- Descriptive statistics on Complaints and Amendments -----------------------
-- In this query you can find tables that summarise data about:
-- 1. Amendments 1: Adendas related to tender process
-- 2. Complaints
-- 3. Amendments 2: Adendas related to complaints
-- 4. Sumarizing reviewing process, ... | true |
66cbeeea8ab6a35872ffca5eebc2cde0121c5513 | SQL | mihirjpatel/SQLScripts | /MSSQL - Useful Scripts/Table - Row Count.sql | UTF-8 | 408 | 3.875 | 4 | [] | no_license |
/******************************
Table Row Count
*******************************/
SELECT sc.name +'.'+ ta.name TableName
,SUM(pa.rows) RowCnt
FROM sys.tables ta
INNER JOIN sys.partitions pa
ON pa.OBJECT_ID = ta.OBJECT_ID
INNER JOIN sys.schemas sc
ON ta.schema_id = sc.schema_id
WHERE ta.is_ms_ship... | true |
f8c20f9d955f105d9ab8eb6c80fda6cf6f14d1ca | SQL | 134130U/Agent_tracking | /premier_pricing_group.sql | UTF-8 | 168 | 3.59375 | 4 | [] | no_license | select *
from account_pricing_groups a
where a.created_at in(select min(created_at) from account_pricing_groups group by account_slug)
order by created_at asc
limit 100 | true |
9a496c2f43d6b2144ddf18d86e96394c374727f3 | SQL | infoshareacademy/jdsz1-raczki | /projekt/Predykcja.sql | UTF-8 | 1,947 | 4.3125 | 4 | [] | no_license | with daty as (select
generate_series(
date_trunc('month', now()-interval '2 month'),
date_trunc('month', now())+interval '1 month'-interval '1 day',
'1 day')::date as wygenerowana_data
),
leady as (
select to_char(data_wysylki, 'YYYY-MM-DD')::date data_leada, count(1) liczba_leadow
from m_lead
group by 1
),... | true |
0da39784ae96d786de788123e3698c6fb151b50e | SQL | eversonsba/trabalhoFinalJava | /trabalho_final/banco borracharia.sql | UTF-8 | 1,318 | 3.78125 | 4 | [] | no_license | DROP DATABASE IF EXISTS borracharia;
CREATE DATABASE IF NOT EXISTS borracharia;
USE borracharia;
CREATE TABLE IF NOT EXISTS clientes(
cnpj VARCHAR(14),
nome varchar(255) NOT NULL,
PRIMARY KEY(cnpj)
);
CREATE TABLE IF NOT EXISTS funcionario_cliente(
id INT AUTO_INCREMENT,
nome VARCHAR(255),
cnpj_cliente VARCHAR(255... | true |
9a59ce5cbe41ed43a914306c4168f7e44009fa5d | SQL | teng-liu/myDocuments | /db/j_db.sql | UTF-8 | 73,334 | 2.84375 | 3 | [] | no_license |
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE TABLE public.process
(
uuid uuid NOT NULL DEFAULT uuid_generate_v4(),
name_key text unique,
content jsonb,
CONSTRAINT process_pkey PRIMARY KEY (uuid)
);
CREATE TABLE public.contract
(
uuid uuid NOT NULL DEFAULT uuid_generate_v4(),
name_key ... | true |
873725be826c1397886d8e51ac46bbc5a33a2519 | SQL | cavigna/modulo_lenguaje_de_consultas_a_una_base_de_datos | /Clase 36 - Examen/Proceso/movies_1.1.sql | UTF-8 | 6,246 | 2.78125 | 3 | [
"MIT"
] | permissive |
--Peliculas
INSERT INTO pelicula(nombre, año, duracion, presupuesto, recaudacion, idioma, pais)
VALUES
('The Matrix', 1999, 138, 63000000, 465000000, 'Ingles', 'USA'),
('Hero', 2002, 119, 85000000, 29980000, 'Chino', 'China'),
('Memento', 2000, 113, 90000000, 39723096, 'Ingles', 'USA'),
('Captain fantastic',201... | true |
f3213416003896c785f66d3e546be19140d88121 | SQL | KKubala/DataBases | /Lista3/lista3.sql | UTF-8 | 1,414 | 4.125 | 4 | [] | no_license | --Kamila Kubala, Pwi
--Zadanie 1
CREATE VIEW ranking
(displayname, liczba_odpowiedzi)
AS
SELECT u.displayname, COUNT(b.id)
FROM posts a
JOIN posts b ON (a.acceptedanswerid = b.id)
JOIN users u ON (u.id = b.owneruserid)
GROUP BY 1
ORDER BY 2 DESC, 1;
-- Zadanie 2
WITH user_with_enl AS
(SELECT DISTINCT userid
FRO... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.